Merge pull request #432 from psathyan/fix_43

Fix versioning tests failures due multiple removal of object
This commit is contained in:
Ali Maredia 2022-03-02 10:35:03 -05:00 committed by GitHub
commit 6f1050c9cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6854,8 +6854,9 @@ def _do_remove_versions(bucket, objname, remove_start_idx, idx_inc, head_rm_rati
for j in xrange(total):
r += head_rm_ratio
if r >= 1:
r %= 1
# Head object can be removed only once.
if r == 1:
remove_obj_head(bucket, objname, k, c)
else:
remove_obj_version(bucket, k, c, idx)