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

Merge results in duplicates #275

Open
jamiefolsom opened this issue Aug 16, 2024 · 2 comments
Open

Merge results in duplicates #275

jamiefolsom opened this issue Aug 16, 2024 · 2 comments
Assignees
Labels
bug Something isn't working sapientia Sapientia

Comments

@jamiefolsom
Copy link
Member

Specifically on the Sapientia/Rumpf project, merging duplicates for "Paris" has resulted in duplicates, same for Amsterdam.

@jamiefolsom jamiefolsom added the bug Something isn't working label Aug 16, 2024
@dleadbetter dleadbetter added the sapientia Sapientia label Aug 23, 2024
@dleadbetter
Copy link
Contributor

dleadbetter commented Aug 23, 2024

@jamiefolsom - I took a look into this, and I'm making some assumptions, but this is what I think is going on:

I took a look at the place records for "Paris" and "Amsterdam" in the "Rumpf Staging" project on staging.coredata.cloud (there doesn't appear to be a "Rumpf" project on Core Data production). All of the records were both created and updated on 2/8/24, which is assume is when the initial import took place. I also pulled a backup of the database locally to test the merge functionality and was unable to reproduce a situation where it created duplicate records. So I don't believe that there is an issue with the merge records functionality, or that these records were created as a result of merging.

I was, however, able to page through some of the records and notice the same uuid values appearing on several pages. This is not a result of duplicate records existing in the database, but rather non-deterministic ordering when sorting by columns with non-unique values. I've opened a PR further upstream in the resource-api repo, as this issue is likely to affect other projects.

@dleadbetter
Copy link
Contributor

After looking at the correct database, I was able to reproduce this issue only by initiating the merge, clicking the "Cancel" button, then initiating the merge again prior to the first merge finishing.

To prevent users from making extra API calls to merge, we should disable all buttons while the request is processing.

dleadbetter added a commit that referenced this issue Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sapientia Sapientia
Projects
None yet
Development

No branches or pull requests

2 participants