From f9ef3cb7209633e0aa03509db838531db7fdffc1 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Tue, 30 Mar 2021 11:20:21 +0900 Subject: [PATCH] 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 --- src/test/osd/RadosModel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); -- 2.47.3