Repository navigation
fix(postprocessing): skip UploadReady events without an upload id - #3607
Open
junkerderprovinz wants to merge 1 commit into
Open
junkerderprovinz wants to merge 1 commit into
junkerderprovinz wants to merge 1 commit into
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The posix driver publishes
UploadReadyfor every non-empty file it assimilates from disk, so search, activitylog and clientlog see files that were copied into the storage directly. Those events have noUploadIDbecause there is no upload session. Postprocessing looked the empty ID up in its store, which fails withnats: invalid key, and logged errors for every such file: two lines on 8.0.1, three on main becausegetPPlogs as well.Postprocessing now returns early for an
UploadReadywithoutUploadID, like it already does for aPostprocessingStepFinishedfrom an on-demand scan. The event is still acked. The other consumers don't readUploadIDand are unchanged.A real upload can't hit the new branch. Its
UploadReadycomes from decomposedfs afterPostprocessingFinishedand carries the ID that postprocessing used as its store key, so an empty ID never matches a stored upload.Related Issue
Motivation and Context
The errors look like failed uploads and bury real ones. On 8.0.1, 300 files copied into a personal space gave 600 error lines at the next start.
How Has This Been Tested?
golang:1.26image and run on data fromopencloudeu/opencloud-rolling:latest(8.0.1), posix driver.UploadReadywithoutUploadIDand expects no error. Without the change it fails withevent error: cannot get upload.UploadReadyevents for assimilated files without errors (reproduction in postprocessing logs "cannot get upload" for every non-empty file the posix driver assimilates #3606). The files were listed in the space, and a WebDAV upload still went through postprocessing.Types of changes
Checklist:
Claude Code helped with the investigation, the reproduction and the fix. I reviewed the change and take responsibility for it.
Assisted-by: Claude Code:claude-opus-5-5