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

Don't die with LockedException when removing/restoring multiple files from trash #28438

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

csware
Copy link
Contributor

@csware csware commented Aug 15, 2021

fixes issue #16491

TODO: Maybe in medium term the whole restore/delete from trash activity should be guarded by a lock.

@csware csware force-pushed the issue-1649 branch 2 times, most recently from ea801ce to ee41c31 Compare August 15, 2021 18:28
@szaimen szaimen added the 3. to review Waiting for reviews label Aug 17, 2021
@szaimen szaimen added this to the Nextcloud 23 milestone Aug 17, 2021
@skjnldsv skjnldsv requested a review from a team August 18, 2021 12:58
@skjnldsv skjnldsv added the bug label Aug 18, 2021
@@ -968,9 +968,21 @@ private static function getVersionsFromTrash($filename, $timestamp, $user) {
[$storage,] = $view->resolvePath('/');

//force rescan of versions, local storage may not have updated the cache
Copy link
Member

Choose a reason for hiding this comment

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

I'm not fully sure about that logic at all, i cannot see why the rescan might be needed these days unless there is an issue with moving the versions there initially. But might be a legacy leftover, maybe @icewind1991 or @PVince81 have any further insight?

Intial scanning introduced in 0254a3c#diff-25ac00f6c51dc1ab8783ce98d51cec3d11a46f104c141a9a0df1896d2bfd31efR923-R924

Copy link
Member

Choose a reason for hiding this comment

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

not sure. and even stranger that this was introduced as part of primary object store, which would usually not be affected by this

… from trash

fixes issue nextcloud#16491

Signed-off-by: Sven Strickroth <email@cs-ware.de>
@csware
Copy link
Contributor Author

csware commented Aug 19, 2021

One test is failing, however, I can't see why. A hint might be really helpful.

@blizzz
Copy link
Member

blizzz commented Aug 24, 2021

One test is failing, however, I can't see why. A hint might be really helpful.

likely a false positive

@csware
Copy link
Contributor Author

csware commented Sep 13, 2021

Any news?

@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv skjnldsv mentioned this pull request Oct 25, 2021
25 tasks
@csware
Copy link
Contributor Author

csware commented Oct 25, 2021

I', using this for several weeks and it works.

@skjnldsv skjnldsv mentioned this pull request Nov 1, 2021
19 tasks
@blizzz blizzz mentioned this pull request Nov 3, 2021
18 tasks
@skjnldsv skjnldsv mentioned this pull request Nov 8, 2021
23 tasks
@blizzz blizzz modified the milestones: Nextcloud 23, Nextcloud 24 Nov 30, 2021
@skjnldsv skjnldsv merged commit 0b01103 into nextcloud:master Dec 21, 2021
@skjnldsv skjnldsv removed the 3. to review Waiting for reviews label Dec 21, 2021
@skjnldsv skjnldsv added the 4. to release Ready to be released and/or waiting for tests to finish label Dec 21, 2021
@Octopus2
Copy link

Hello and thank you for solving this annoying problem.
Is there a possibility of a backport to version 22 and 23?
Best regards

@csware
Copy link
Contributor Author

csware commented Dec 23, 2021

/backport to stable23
/backport to stable22

@csware
Copy link
Contributor Author

csware commented Dec 23, 2021

/backport to stable22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permanently deleting/restoring multiple files from trash results in OCP\Lock\LockedException
8 participants