Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] fix: write object to the correct urn when moving from another storage to object store #47487

Open
wants to merge 4 commits into
base: stable27
Choose a base branch
from

Conversation

backportbot[bot]
Copy link

@backportbot backportbot bot commented Aug 26, 2024

Backport of PR #46013

@backportbot backportbot bot added the 3. to review Waiting for reviews label Aug 26, 2024
Copy link
Member

@danxuliu danxuliu left a comment

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
Contributor

artonge commented Oct 31, 2024

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

icewind1991 and others added 3 commits October 31, 2024 15:11
… 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>
@artonge artonge force-pushed the backport/46013/stable27 branch from 39da4f5 to 260b672 Compare October 31, 2024 14:11
@danxuliu danxuliu dismissed their stale review October 31, 2024 16:23

Regression fixed in cherry-picked commits

@icewind1991
Copy link
Member

This should probably also have 3e12e1e

Signed-off-by: Robin Appelman <robin@icewind.nl>
$this->copyObjects($sourceStorage, $sourceCache, $sourceCacheEntry);
if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class)) {
/** @var ObjectStoreStorage $sourceStorage */
$sourceStorage->setPreserveCacheOnDelete(true);

Check failure

Code scanning / Psalm

UndefinedMethod Error

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 Error

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

blizzz commented Dec 5, 2024

CI is lotta red

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants