-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove actual object version #971
Conversation
api/layer/layer.go
Outdated
@@ -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)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]>
e298ae8
to
7bfe508
Compare
Closes #955.