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: duplicate entry for key 'gf_versions_uniq_index' #2720

Closed
wants to merge 2 commits into from

Conversation

luka-nextcloud
Copy link

No description provided.

Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

This does not explain why we do find 0 versions here, but then fail to create a version.

Have you been able to reproduce the issue?

@luka-nextcloud
Copy link
Author

This does not explain why we do find 0 versions here, but then fail to create a version.

Have you been able to reproduce the issue?

Here's my case to reproduce this issue:

  1. Create a group folder A
  2. Create a group folder B
  3. Create a file called Test.md in group folder A
  4. Edit file Test.md and save
  5. Move file Test.md to group folder B
  6. Run command occ groupfolders:expire -v

@luka-nextcloud luka-nextcloud requested a review from artonge January 9, 2024 17:24
@luka-nextcloud luka-nextcloud force-pushed the bugfix/duplicate-entry-index-error branch from f1ca498 to f9776ed Compare January 10, 2024 18:10
@luka-nextcloud luka-nextcloud force-pushed the bugfix/duplicate-entry-index-error branch from f9776ed to 97dcb00 Compare January 10, 2024 18:11
@miaulalala
Copy link
Collaborator

This does not explain why we do find 0 versions here, but then fail to create a version.

Have you been able to reproduce the issue?

Read- write split? If it's a clustered setup there's no guarantee a write will have propagated to all nodes by the time we read, no?

@luka-nextcloud
Copy link
Author

This case might occur, but only if group version records were not created (or already deleted) somehow. The group version record should be created right after a file updated.

@artonge
Copy link
Contributor

artonge commented Jan 16, 2024

I found the issue. The version backend is given a broken fileinfo in the case the Luka described. This leads to an incorrect query which returns no results, and explain that we then fail to insert an entry as it already exists.

Closing in favor of #2758

@artonge artonge closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Items that need to be reviewed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants