Skip to content

Retry lock acquiring after delay #17016

Closed

Description

@PVince81

Like for the old files_locking app, we might want to add a wait loop + delay when acquiring a lock.
Basically if the lock is not available, wait a few milliseconds and try again.

A bit like https://github.com/owncloud/files_locking/blob/master/lib/lock.php#L105

@icewind1991 @DeepDiver1975 @nickvergessen

Activity

  1. added this to the milestone on Mar 2, 2016
  2. PVince81 commented on Mar 2, 2016

    @PVince81
    ContributorAuthor

    I'm pretty sure there must be a duplicate but I can't find it now...

  3. modified the milestones: , on Jun 14, 2016
  4. PVince81 commented on Jan 10, 2017

    @PVince81
    ContributorAuthor

    In some cases, background jobs that do filesystem operations might lock some folders during their operation. If someone is uploading a huge file, that one will likely fail with 423 Locked.

    In fact, it happened to me recently: I uploaded a new 1.5 GB file through Webdav and it took several hours (because my upload speed here sucks...). When it finally reached the final bytes, it failed with 423 Locked.
    When looking at the log it appears that some cron jobs were running around the same time.

    Especially for such scenarios it would be useful to have a "wait and retry" logic when acquiring locks. If after a specific timeout the lock is still not free, return the 423 Locked error.

    @DeepDiver1975 @butonic @guruz @ogoffart @davivel @dragotin does that make sense ?

  5. PVince81 commented on Jan 10, 2017

    @PVince81
    ContributorAuthor

    Another case here: #26896

  6. 12 remaining items

  7. ownclouders commented on Feb 23, 2018

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

    (This is an automated comment from GitMate.io.)

  8. guruz commented on May 20, 2019

    @guruz
    Contributor

    Please implement this. I get this with demo.owncloud.com in the root directory when uploading a big file (using a single WebDAV PUT, no oC chunking) to remotes.php/wedav.

    I don't know the cause or who locked something. Is it related to me using no chunking?

  9. stale commented on Sep 21, 2021

    @stale

    This issue has been automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions