-
Notifications
You must be signed in to change notification settings - Fork 109
Implement collaborative locking #2248
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
Conversation
ae86f94 to
c49a0e9
Compare
59075db to
d17137d
Compare
Signed-off-by: Julius Härtl <[email protected]> TMP: Switch to OCP branch for tests Signed-off-by: Julius Härtl <[email protected]> Let locked files open in read only Signed-off-by: Julius Härtl <[email protected]> Adapt LockScope to LockContext rename Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
11d8ab5 to
f526f7d
Compare
Signed-off-by: Julius Härtl <[email protected]>
b6aa2be to
8979993
Compare
|
/compile amend / |
Signed-off-by: Julius Härtl <[email protected]> Signed-off-by: nextcloud-command <[email protected]>
8979993 to
42a7882
Compare
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A few minor remarks.
| $this->lockManager->lock(new LockContext( | ||
| $file, | ||
| ILock::TYPE_APP, | ||
| Application::APP_NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of topic but this could become Application::APP_ID at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, something for a separate PR.
| Application::APP_NAME | ||
| )); | ||
| } catch (NoLockProviderException $e) { | ||
| } catch (PreConditionNotMetException $e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No warning logs here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd let the actual lock provider handle that, from the text app side there is no special interest if we unlock a file that has already been unlocked.
|
/backport to stable24 |
To be tested together with nextcloud/files_lock#54