Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REM] UUID: remove fast strategy #5030

Closed
wants to merge 2 commits into from
Closed

Conversation

rrahir
Copy link
Collaborator

@rrahir rrahir commented Sep 27, 2024

THe fast strategy for uuid generator was introduced to speed up the startup of a model, specifically when generating cells which could be numerous and the calls to crypto could become a hassle. However, we realised later on that a uuid was useless for that specific purpose. More specifically, a uuid is useful to generate unique identifiers that will be shared accross users to avoid collisions in multi-user context (i.e. concurrent updates).
In other cases, shortcutting the uuid generator to become a simple incremented integer value is either wrong or shows the uselessness of calling uuidGenerator in the first place.

Task: 4216816

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

THe fast strategy for uuid generator was introduced to speed up the
startup of a model, specifically when generating cells which could be
numerous and the calls to crypto could become a hassle.
However, we realised later on that a uuid was useless for that specific
purpose. More specifically, a uuid is useful to generate unique
identifiers that will be shared accross users to avoid collisions in
multi-user context (i.e. concurrent updates).
In other cases, shortcutting the uuid generator to become a simple
incremented integer value is either wrong or shows the uselessness of
calling uuidGenerator in the first place.

Task: 4216816
@robodoo
Copy link
Collaborator

robodoo commented Sep 27, 2024

Pull request status dashboard

Using uuids in core plugins is either:

- wrong if the id is supposed to be shared across users since a different one
  would be generated for each users.
- useless if they aren't shared: the id doesn't need to be unique.

This commit removes the `uuidGenerator` from core plugins because it shouldn't
be used.

The use in the Table plugin was useless (the id is never shared, it's not part
of any table core command)

Task: 4216816
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

I pushed an additional commit to remove this.uuidGenerator from core plugins to discourage the use of uuids.
What do you think?

@VincentSchippefilt
Copy link
Collaborator

robodoo r+

@robodoo
Copy link
Collaborator

robodoo commented Oct 7, 2024

@rrahir @VincentSchippefilt because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

@LucasLefevre
Copy link
Collaborator

robodoo rebase-ff

@robodoo
Copy link
Collaborator

robodoo commented Oct 7, 2024

Merge method set to rebase and fast-forward.

robodoo pushed a commit that referenced this pull request Oct 7, 2024
THe fast strategy for uuid generator was introduced to speed up the
startup of a model, specifically when generating cells which could be
numerous and the calls to crypto could become a hassle.
However, we realised later on that a uuid was useless for that specific
purpose. More specifically, a uuid is useful to generate unique
identifiers that will be shared accross users to avoid collisions in
multi-user context (i.e. concurrent updates).
In other cases, shortcutting the uuid generator to become a simple
incremented integer value is either wrong or shows the uselessness of
calling uuidGenerator in the first place.

Task: 4216816
Part-of: #5030
Signed-off-by: Vincent Schippefilt (vsc) <[email protected]>
robodoo pushed a commit that referenced this pull request Oct 7, 2024
Using uuids in core plugins is either:

- wrong if the id is supposed to be shared across users since a different one
  would be generated for each users.
- useless if they aren't shared: the id doesn't need to be unique.

This commit removes the `uuidGenerator` from core plugins because it shouldn't
be used.

The use in the Table plugin was useless (the id is never shared, it's not part
of any table core command)

closes #5030

Task: 4216816
Signed-off-by: Vincent Schippefilt (vsc) <[email protected]>
@robodoo robodoo closed this Oct 7, 2024
@robodoo robodoo added the 18.1 label Oct 7, 2024
@fw-bot fw-bot deleted the master-remove-fast-uuid-rar branch October 21, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants