Skip to content

Stray part files after failed upload due to locking #17149

Closed

Description

@PVince81

Steps

  1. Enable exp file locking
  2. Add sleep(10); here: https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/file.php#L204
  3. Start two cadaver sessions
  4. Session 1: put file "test.txt"
  5. Session 2: put file "test.txt" (same name)

Expected result

Session 1 finishes upload.
Session 2 gets 423 locked.
No stray part files.

Actual result

Session 1 finishes upload.
Session 2 gets 423 locked.
Stray part files present.

Versions

ownCloud 8.1 git master (1e7a3a4)

We need to catch the exception and clean up the part file.

Activity

  1. added this to the milestone on Jun 24, 2015
  2. PVince81 commented on Jun 24, 2015

    @PVince81
    ContributorAuthor

    @icewind1991 @DeepDiver1975 FYI, not sure if sev2-high or sev3-medium

    Hopefully an easy fix.

    Also: need to check both small file upload and chunk upload, as this issue might happen for both.

  3. PVince81 commented on Jun 25, 2015

    @PVince81
    ContributorAuthor

    Hmmm, from the code it looks like regardless of the exception, the part file will never be deleted... see https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/file.php#L149

    So this is an old issue that happened with failed upload/permissions error, but which might now happen more often due to locking.

  4. PVince81 commented on Jun 26, 2015

    @PVince81
    ContributorAuthor

    PR here: #17189

  5. locked as resolved and limited conversation to collaborators on Aug 10, 2019
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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions