-
Notifications
You must be signed in to change notification settings - Fork 3
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
Renaming a folder duplicates it #11
Comments
there was a potential fix on server master that did not get backported: nextcloud/server#24185 however, despite us telling S3 to delete the object, it doesn't delete it 😦 |
even deleting the previous empty folder afterwards in the web UI doesn't work, probably as it's also calling debugging deeper I do see that the S3 request returned with a 204 No Content, so it seems it's been deleted properly, and yet the object is still there... I'm wondering if it's the versioning thing that is getting in the way |
even if I create an empty folder in the Minio web console, put something in it, then delete the file. and after finding minio/minio#10914 it seems that maybe it's "marked as deleted" in some way but the UI isn't clear about this so maybe there's a way to force delete over the API... |
I've tried adding explicit deletion of the versions in the do {
// delete versions of container, if any
$objects = $connection->listObjectVersions([
'Bucket' => $this->bucket,
'Prefix' => $path . '/',
]);
if (isset($objects['DeleteMarkers'])) {
/*
$versionIds = array_map(function ($object) {
return $object['VersionID'];
}, $objects['DeleteMarkers']);
*/
/*
$this->getConnection()->deleteObjects([
'Bucket' => $this->bucket,
'Delete' => [
//'Objects' => $versionIds,
'Objects' => $objects['DeleteMarkers'],
]
]);
*/
foreach ($objects['DeleteMarkers'] as $versionObject) {
$this->getConnection()->deleteObject([
'Bucket' => $this->bucket,
'Key' => $versionObject['Key'],
'VersionId' => $versionObject['VersionId'],
]);
}
}
} while ($objects['IsTruncated']); but neither operation raise any error, they just say "all is fine" but nothing happens:
the zombie folder still exists |
alright, so deleting the marker is probably wrong as it is stated that the contents of the folder will reappear: https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeletingObjects.html |
PR here: nextcloud/server#29165 I had developed this against v21.0.5 first and could see that the folder was properly deleted. |
solution was reverted as it would lose versions since those are not copied over, see #13 |
the new solution is nextcloud/server#29220 where folders marked as deleted are skipped in listing |
fixed through nextcloud/server#29220 |
Steps to reproduce
docker run -p 9000:9000 minio/minio server /data{1...12}
Expected result
Folder "test" is renamed to "test_renamed" with no leftovers.
Actual result
Folder "test" and its contents are renamed to "test_renamed".
But there's another folder "test" without any contents.
Versions
Nextcloud v21.0.5
files_versions_s3 v0.1.6
Logs
No relevant log entries are added.
Notes
This is similar to nextcloud/server#29142 but behaves differently with versioning enabled.
It is possible that nextcloud/server#29142 is the root cause and maybe this app doesn't handle the error correctly.
Interestingly there is no log entry, unlike nextcloud/server#29142 so perhaps this app is using a different code path to do the copy.
The text was updated successfully, but these errors were encountered: