Skip to content

several postprocessing cornercases are broken #8848

Open

Description

@butonic

In cs3org/reva#4625 we added test cases for the possible async postprocessing outcomes when twe uploads are being processed in parallel. They were discovered while implementing cs3org/reva#4615 which fixes #8606. But only on the happy path.

There are still outcomes where file metadata is not cleaned up propery. I'll reproduce the cases here

  • the first can succeed before the second succeeds - Works!
  • the first can succeed after the second succeeds - Works!
  • the first can succeed before the second fails - Works!
  • the first can succeed after the second fails - the file should still be in "processing" after second upload is deleted
  • the first can fail before the second succeeds - list of revisions should be 0
  • the first can fail after the second succeeds - list of revisions should be 0
  • the first can fail before the second fails - file should be deleted, size should be correctly reverted
  • the first can fail after the second fails - file should be deleted, size should be correctly reverted

The root cause is the lack of consistent tracking of currently ongoing upload sessions.

Currently, we create the node metadata only when an upload finishes successfully. In order to tie together concurrently running upload sessions we have to create the node as part of the InitiateFileUpload call. Clients can already deal with an unaccessible node that has status 425, so this should not be a problem.

Then we can add all upload sessions to the node metadata with a list of key value pairs:
user.ocis.upload.{timestamp} -> {size};{sessionid}

The size can be used to calculate the sizediff when comparing it with the current node size. When stating a file the latest ongoing upload will override the node size. If an upload is successful, it will replace the size in the node. hm, then the second youngest upload size will overrule the latest size ...

🤔

Activity

  1. self-assigned this
    on Apr 12, 2024
  2. moved this from Qualification to In progress in Infinite Scale Team Boardon Apr 12, 2024
  3. removed their assignment
    on Apr 25, 2024
  4. moved this from In progress to Prio 3 or less in Infinite Scale Team Boardon Apr 25, 2024
  5. kobergj commented on Feb 11, 2025

    @kobergj
    Contributor

    Scope:
    Check the following postprocessing cornercases:

    • the first can succeed after the second fails - the file should still be in "processing" after second upload is deleted
    • the first can fail before the second succeeds - list of revisions should be 0
    • the first can fail after the second succeeds - list of revisions should be 0
    • the first can fail before the second fails - file should be deleted, size should be correctly reverted
    • the first can fail after the second fails - file should be deleted, size should be correctly reverted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions