Thanks to visit codestin.com
Credit goes to github.com

Skip to content

perf(encryption): use unset unused unencrypted filesize cache - #64287

Open
susnux wants to merge 1 commit into
masterfrom
fix/encryption-unencrypted-size
Open

perf(encryption): use unset unused unencrypted filesize cache#64287
susnux wants to merge 1 commit into
masterfrom
fix/encryption-unencrypted-size

Conversation

@susnux

@susnux susnux commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

We need to keep unencrypted filesize inmemory because:

  • A fresh upload has no cache row at stream_close time. The entry is consumed later by getMetaData during the post-write scan and modifyMetaData so until the caller persisted it we need to keep in in cache
  • Part files have no cache row at all, their entry must survive until the rename to the final path.

So for huge operations like moving / copying whole folder trees this cache would otherwise grow infinite large.

Checklist

AI (if applicable)

Claude used to generate unit tests.

  • The content of this PR was partly or fully generated using AI

We need to keep unencrypted filesize inmemory because:
- A fresh upload has no cache row at `stream_close` time.
  The entry is consumed later by `getMetaData` during the post-write scan and `modifyMetaData` so until the caller persisted it we need to keep in in cache
- Part files have no cache row at all, their entry must survive until the `rename` to the final path.

So for huge operations like moving / copying whole folder trees this
cache would otherwise grow infinite large.

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux added this to the Nextcloud 36 milestone Sep 13, 2026
@susnux
susnux requested a review from a team as a code owner September 13, 2026 14:10
@susnux
susnux requested review from icewind1991 and removed request for a team September 13, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants