You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"reqId":"EVhVN+4pQUfs13GXLu4y","remoteAddr":"127.0.0.1","app":"hook","message":"error while running hook (OCA\\Files_Versions\\Hooks::write_hook): folder\/bacon.txt is locked","level":3,"time":"2015-06-12T11:19:41+00:00","method":"PUT","url":"\/owncloud\/remote.php\/webdav\/folder\/bacon.txt"}
No version created.
@icewind1991 something wrong with locking and hooks.
Should we rewrite files_versions to use storages instead of of views ?
The exception happens in a pre-hook, where Storage::store() for the versions is called to copy the current file to a version. This happens before the final rename.
Maybe the lock should be made a shared lock first and exclusive only before the rename, after the prehooks. I believe this is what we already do in the view.
Activity
PVince81 commentedon Jun 12, 2015
Observed on master (cda9685)
PVince81 commentedon Jun 12, 2015
Does not happen when overwriting file in the web UI.
Also does not happen with big files (chunking).
This means this is the code path for WebDAV PUT of small files, the one that has specific/explicit locking code and does not go through the view.
I'll have a look.
PVince81 commentedon Jun 12, 2015
The exception happens in a pre-hook, where Storage::store() for the versions is called to copy the current file to a version. This happens before the final rename.
Maybe the lock should be made a shared lock first and exclusive only before the rename, after the prehooks. I believe this is what we already do in the view.
I'll have a try.
PVince81 commentedon Jun 12, 2015
PR will arrive soon. Struggling with unit tests.
PVince81 commentedon Jun 12, 2015
Fix is here #16912