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: Only update lock timeout when it is not infinite #288

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Apr 15, 2024

Otherwise if the desktop client tries to refresh an infinite lock it will auto expire on the next check as it will be set to 1 second (0 - (-1) - 0)

@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Apr 15, 2024
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

nice catch!

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@juliusknorr juliusknorr force-pushed the fix/extend-infinite-lock branch from be60b56 to c5ec9cb Compare April 16, 2024 08:31
@Jerome-Herbinet
Copy link
Member

Hi @juliushaertl,
Can you describe a buggy behavior which will be fixed by your PR and how (in order, for me, to understand well) ?
Thanks

@juliusknorr
Copy link
Member Author

When using open locally the desktop client will lock the file and send another lock request to extend once it is opened. This lead to the lock disappearing almost immediately after opening locally.

@juliusknorr juliusknorr merged commit 2edf18f into main Apr 16, 2024
44 checks passed
@juliusknorr juliusknorr deleted the fix/extend-infinite-lock branch April 16, 2024 09:13
@juliusknorr
Copy link
Member Author

/backport to stable29

@juliusknorr
Copy link
Member Author

/backport to stable28

Copy link

backportbot bot commented Apr 16, 2024

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

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

# Create the new backport branch
git checkout -b backport/288/stable29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c5ec9cbe

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/288/stable29

Error: Failed to clone repository: Failed to checkout branches: error: pathspec 'stable29' did not match any file(s) known to git


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@juliusknorr
Copy link
Member Author

/backport to stable27

@Jerome-Herbinet
Copy link
Member

When using open locally the desktop client will lock the file and send another lock request to extend once it is opened. This lead to the lock disappearing almost immediately after opening locally.

OK thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants