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

[FIX] utm: set counters from 0 #162229

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

reth-odoo
Copy link
Contributor

@reth-odoo reth-odoo commented Apr 17, 2024

_find_or_create_record works with the assumption that the new record will be created with the exact name requested.

However create on most utm records ensures we never create duplicates by incrementing a counter at the end of the name name, name [2], ....

This counter simply increments from the highest existing value. Meaning if you have name [2], name[4] it will simply create name [5], even if name (name [1]) doesn't exist.

This breaks the assumption of _find_or_create_record. Meaning every single time this method is called with a name that is 'duplicate' but not an exact match, it will keep creating 'duplicates' that are not exact matches.

This leads to a gigantic number of mediums and sources being created.

task-3874538

`_find_or_create_record` works with the assumption that the new record
will be created with the exact name requested.

However `create` on most utm records ensures we never create duplicates by
incrementing a counter at the end of the name `name, name [2], ...`.

This counter simply increments from the highest existing value.
Meaning if you have `name [2], name[4]` it will simply create `name [5]`.

This breaks the assumption of `_find_or_create_record`.
Meaning every single time this method is called with a name that is 'duplicate'
but not an exact match, it will keep creating 'duplicates' that are not exact matches.

This leads to a gigantic number of mediums and sources being created.

task-3874538
@robodoo
Copy link
Contributor

robodoo commented Apr 17, 2024

@C3POdoo C3POdoo requested a review from a team April 17, 2024 13:31
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants