Skip to content

Commit 69353cf

Browse files
committed
RGW | fixed enqueueing the overwritten object for gc
Signed-off-by: Ali Masarwa <[email protected]>
1 parent 6c00155 commit 69353cf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/rgw/driver/rados/rgw_rados.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,9 +3258,8 @@ int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_si
32583258
ptag = index_op->get_optag();
32593259
}
32603260

3261-
r = target->get_state(rctx.dpp, &target->state, &target->manifest, false, rctx.y);
3262-
if (r < 0)
3263-
return r;
3261+
target->manifest = manifest;
3262+
target->state = state;
32643263
RGWObjState* current_state = target->state;
32653264
if (!target->obj.key.instance.empty()) {
32663265
r = target->get_current_version_state(rctx.dpp, current_state, rctx.y);
@@ -6028,6 +6027,9 @@ int RGWRados::bucket_suspended(const DoutPrefixProvider *dpp, rgw_bucket& bucket
60286027

60296028
int RGWRados::Object::complete_atomic_modification(const DoutPrefixProvider *dpp, bool keep_tail, optional_yield y)
60306029
{
6030+
int r = get_state(dpp, &state, &manifest, false, y);
6031+
if (r < 0)
6032+
return r;
60316033
if ((!manifest) || keep_tail)
60326034
return 0;
60336035

0 commit comments

Comments
 (0)