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

Handle missing disk versions #2758

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Jan 16, 2024

This PR is a palliative upon groupfolders failing to move versions correctly when a file is moved across storage.

  1. Delete versions folder when we detect that the original file in the group folder is not there anymore.(GroupVersionsExpireManager.php)
  2. Create the version folder before reading it (VersionsBackend.php).
  3. Delete version entity in the DB if the disk counterpart does not exist (VersionsBackend.php).

Fix #2559

@artonge
Copy link
Contributor Author

artonge commented Jan 16, 2024

/backport to stable28

@artonge
Copy link
Contributor Author

artonge commented Jan 16, 2024

/backport to stable27

@artonge artonge added 3. to review Items that need to be reviewed php Items related to PHP updates and code issues labels Jan 16, 2024
@artonge artonge force-pushed the artonge/fix/missing_disk_versions branch 2 times, most recently from 76969c6 to e82162b Compare January 16, 2024 14:10
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge force-pushed the artonge/fix/missing_disk_versions branch from e82162b to af55fa7 Compare January 16, 2024 15:12
@skjnldsv skjnldsv merged commit e081ca1 into master Jan 17, 2024
39 checks passed
@skjnldsv skjnldsv deleted the artonge/fix/missing_disk_versions branch January 17, 2024 06:53
@backportbot-nextcloud
Copy link

The backport to stable27 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable27
git pull origin stable27

# Create the new backport branch
git checkout -b fix/foo-stable27

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123

# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable27

Error: Unknown error

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

@EDVB-Paulick
Copy link

When is this patch available in 28? We really need it.

Cheers

@artonge
Copy link
Contributor Author

artonge commented Jan 17, 2024

When is this patch available in 28? We really need it.

If this is important to you, please get a subscription at Nextcloud :).

@EDVB-Paulick
Copy link

When is this patch available in 28? We really need it.

If this is important to you, please get a subscription at Nextcloud :).

You are right, we are working on this issue internally ... ;-)

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 backport-request bug php Items related to PHP updates and code issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backends provided no user object / Duplicate entry for key 'gf_versions_uniq_index'
3 participants