Skip to content

fix(upload): [OCISDEV-1477] create a new file in one write in PrepareUpload - #756

Open
f-firas wants to merge 14 commits into
mainfrom
fix/OCISDEV-1477-upload-write-batching
Open

f-firas wants to merge 14 commits into
mainfrom
fix/OCISDEV-1477-upload-write-batching

Conversation

@f-firas

@f-firas f-firas commented Oct 1, 2026 •

Copy link
Copy Markdown

This PR cuts down the disk work the upload coordinator does when an upload finishes. Since uploads started going through the coordinator, finishing a new file took four separate writes to the node's metadata plus two saves of the upload session, where the old upload path did one of each. Every write rewrites the whole .mpk, which is why the seed phase of the load test was noticeably slower than master.

PrepareUpload already writes a batch of attributes to the node, so it now also creates the node when it doesn't exist yet, and sets the processing flag in that same batch. That makes the coordinator's separate TouchFile and MarkProcessing calls unnecessary, and the session only needs saving once, after PrepareUpload. The node is created under the id we already mint at initiate, so nothing has to be swapped in afterwards. If PrepareUpload fails, it purges the node it created itself (no Delete permission needed), and the checks that can reject an upload without touching the node, like checksums and request metadata, now run before anything is created.

@f-firas
f-firas requested a review from a team as a code owner October 1, 2026 09:34
@kw-security

kw-security commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@f-firas f-firas changed the title fix(upload): [OCISDEV-1477] verify checksums before creating the node fix(upload): [OCISDEV-1477] create a new file in one write in PrepareUpload Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants