Skip to content

[stable26] fix: write object to the correct urn when moving from another storage to object store - #47488

Closed
backportbot[bot] wants to merge 4 commits into
stable26from
backport/46013/stable26
Closed

[stable26] fix: write object to the correct urn when moving from another storage to object store#47488
backportbot[bot] wants to merge 4 commits into
stable26from
backport/46013/stable26

Conversation

@backportbot

Copy link
Copy Markdown

Backport of PR #46013

danxuliu
danxuliu previously requested changes Oct 31, 2024

@danxuliudanxuliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change introduced a regression as described in #47986 (comment)

@artonge

Copy link
Copy Markdown
Collaborator

Cherry-picked commits from https://github.com/nextcloud/server/pull/48998/commits

@artonge
artongeforce-pushed the backport/46013/stable26 branch from 6fee632 to 344d058CompareOctober 31, 2024 14:28
@danxuliu
danxuliu dismissed their stale reviewOctober 31, 2024 16:23

Regression fixed in cherry-picked commits

@artonge

Copy link
Copy Markdown
Collaborator

@icewind1991 should we include 3e12e1e here too?

@artonge
artongeforce-pushed the backport/46013/stable26 branch from 344d058 to 4c95ba9CompareNovember 6, 2024 11:34
$this->copyObjects($sourceStorage, $sourceCache, $sourceCacheEntry);
if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class)) {
/** @var ObjectStoreStorage $sourceStorage */
$sourceStorage->setPreserveCacheOnDelete(true);

Check failure

Code scanning / Psalm

UndefinedMethod

Method OC\Files\ObjectStore\ObjectStoreStorage::setPreserveCacheOnDelete does not exist
}
if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class)) {
/** @var ObjectStoreStorage $sourceStorage */
$sourceStorage->setPreserveCacheOnDelete(false);

Check failure

Code scanning / Psalm

UndefinedMethod

Method OC\Files\ObjectStore\ObjectStoreStorage::setPreserveCacheOnDelete does not exist
@kesselb
kesselb removed their request for review November 7, 2024 20:41
@blizzz

Copy link
Copy Markdown
Member

if this is still relevant, CI is also here a lotta red. Otherwise close.

icewind1991and others added 4 commits February 5, 2025 19:01
… to object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.
The behavior improves a lot with #46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
Some are still failing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Robin Appelman <robin@icewind.nl>
@AndyScherzinger

Copy link
Copy Markdown
Member

What blizzz said #47488 (comment)

@artonge@sorbaugh

@blizzz

Copy link
Copy Markdown
Member

Still red

@skjnldsv

Copy link
Copy Markdown
Member

Closing as stale and EOL branch.
If still required, please resume your work on it by rebasing and requesting for reviews again 🙏

@susnux
susnux deleted the backport/46013/stable26 branch November 1, 2025 11:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@artonge@blizzz@AndyScherzinger@skjnldsv@danxuliu@github-advanced-security@icewind1991@come-nc