From: myoungwon oh Date: Tue, 30 Mar 2021 02:20:21 +0000 (+0900) Subject: src/test: fix not updating the object state in the error case X-Git-Tag: v17.1.0~2307^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f9ef3cb7209633e0aa03509db838531db7fdffc1;p=ceph.git src/test: fix not updating the object state in the error case This commit prevent updating wrong state, which happens when TierFlush receives error values. Signed-off-by: Myoungwon Oh --- diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h index 63d93622a30c..5cb37946ba15 100644 --- a/src/test/osd/RadosModel.h +++ b/src/test/osd/RadosModel.h @@ -2954,6 +2954,8 @@ public: cout << num << ": got " << cpp_strerror(r) << std::endl; if (r == 0) { // sucess + context->update_object_tier_flushed(oid, snap); + context->update_object_version(oid, completion->get_version64(), snap); } else if (r == -EBUSY) { // could fail if snap is not oldest ceph_assert(!context->check_oldest_snap_flushed(oid, snap)); @@ -2971,8 +2973,6 @@ public: } ceph_abort_msg("shouldn't happen"); } - context->update_object_tier_flushed(oid, snap); - context->update_object_version(oid, completion->get_version64(), snap); context->oid_in_use.erase(oid); context->oid_not_in_use.insert(oid); context->kick();