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

Push lock handling logic to storage interfaces #69

Merged
merged 3 commits into from
Mar 25, 2022
Merged

Push lock handling logic to storage interfaces #69

merged 3 commits into from
Mar 25, 2022

Conversation

glpatcern
Copy link
Member

@glpatcern glpatcern commented Mar 22, 2022

In this PR some lock handling logic has been removed from the core WOPI logic and delegated to the storage interfaces, in the assumption that the different CS3 storage providers do implement what is required:

  • getlock() of an expired lock returns None
  • refreshlock() and setlock() of an existing or expired lock behave as per CS3API specs
  • A lock is not any longer auto-extended based on the last save time from PutFile actions.

The xrootd interface has been adapted, but the detection of external locks now depends on the (EOS) storage to fail a setlock() operation when a flock exists on the file, as the wopiserver cannot tell any longer if a previously found LibreOffice lock is not owned by itself in the general case of no permissions in the folder (single-file share). Yet, the logic to inspect LibreOffice or MS Office lock files is kept in case permissions allow.

For Reva, cs3org/reva#2444 and cs3org/reva#2625 are expected to be merged for this to work.

…PI logic itself, not by the storage layers"

Eventually we want to have the storage layers implement this logic, not WOPI

This reverts commit 02f7072.
@glpatcern glpatcern self-assigned this Mar 22, 2022
@glpatcern glpatcern marked this pull request as draft March 22, 2022 20:11
@glpatcern glpatcern force-pushed the locking branch 4 times, most recently from 8540c31 to 3c6610c Compare March 23, 2022 21:02
@glpatcern glpatcern marked this pull request as ready for review March 25, 2022 08:19
@glpatcern glpatcern merged commit 06c97a6 into master Mar 25, 2022
@glpatcern glpatcern deleted the locking branch March 25, 2022 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant