nextcloud / files_lock

GNU Affero General Public License v3.0
24 stars 8 forks source link

File locking currently only 30min #49

Closed tobiasKaminsky closed 2 years ago

tobiasKaminsky commented 2 years ago

As dicussced in https://github.com/nextcloud/server/issues/21914 I assumed that file locking will be "forever", but Maxence said that current state locks file only for 30min, which could be changed to a config value. This means that longer editing of a file is not possible. On the other hand it means that we do not need to have any unlock mechanism via admin.

@AndyScherzinger @schiessle what is your opinion here?

AndyScherzinger commented 2 years ago

Well I'd be fine either way.

So my take is

juliushaertl commented 2 years ago

lock-time via config: clients now not just need to handle lock/unlock but also deal with a "lock-steal" situation, where lock time is e.g. 4h and a user works on the doc for 6h, tries to save, but no another used grabbed the lock after the file auto-unlocked. Also then the discussion will start that the client should "update the lock-timeframe" whenever a save is triggers or other ideas.

I'm wondering if we should not still consider such scenarios, as the lock might also be removed by an admin and then clients should be able to handle such lock-steal scenarios anyways in some way. I could imagine that they could implement similar behaviour as a conflicting file would have on the desktop client, where a copy is preserved for manual resolution.

Nevertheless, support for infinite lock timeout is started in #55 just the decision on the default I would make dependent on above considerations.