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

Remove actual object version #971

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

smallhive
Copy link
Contributor

Closes #955.

@@ -569,7 +569,7 @@ func (n *layer) deleteObject(ctx context.Context, bkt *data.BucketInfo, settings
}

if obj.DeleteMarkVersion, obj.Error = n.removeOldVersion(ctx, bkt, nodeVersion, obj); obj.Error != nil {
return obj
n.log.Error("remove old version", zap.Error(obj.Error))
Copy link
Member

Choose a reason for hiding this comment

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

Why does it happen? I'm not sure it's "Error" level, maybe it's perfectly fine in some cases.

Copy link
Contributor Author

@smallhive smallhive Jul 1, 2024

Choose a reason for hiding this comment

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

I didn't find the exact reason for the problem, but it is directly connected to the multithreading in the test. Without threads, the code works perfectly. I consider that in some cases not all objects are removed because some error handling returns as here. Well, the error may be too much, replaces with Info.
As minimum, this change doesn't effect current s3 tests

Copy link
Contributor

Choose a reason for hiding this comment

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

@smallhive do we know exact obj.Error which caused test failures? May be we can exclude only "normal" errors here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried this approach. The error in this place is Object not found and sometimes Object already removed or something like that.
In this line we are trying to remove some old version. Returning from here allows for the actual version be not removed, and this fix removes all versions.
Anyway, this line fixes the tests and don't mark any other tests with red

Closes #955.

Signed-off-by: Evgenii Baidakov <[email protected]>
@smallhive smallhive force-pushed the 955-parallel-deletion-of-versioned-objects branch from e298ae8 to 7bfe508 Compare July 1, 2024 04:03
@cthulhu-rider cthulhu-rider merged commit b7bc216 into master Jul 4, 2024
14 of 16 checks passed
@cthulhu-rider cthulhu-rider deleted the 955-parallel-deletion-of-versioned-objects branch July 4, 2024 16:00
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.

After a parallel deletion of versioned objects, list objects returns info about them
3 participants