From: Sun Yuechi Date: Wed, 1 Jul 2026 04:46:22 +0000 (+0800) Subject: crimson/osd/ec_backend: fix OP_OMAP_RMKEYRANGE translation X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=508e6972fae33c3de0c5a63a8431efc7afb943ae;p=ceph.git crimson/osd/ec_backend: fix OP_OMAP_RMKEYRANGE translation transate_transaction() handled OP_OMAP_RMKEYRANGE in the same case block as OP_OMAP_SETHEADER, decoding a single bufferlist and calling omap_setheader(). But OP_OMAP_RMKEYRANGE encodes first/last as two strings, so decode_bl() misreads the stream and the wrong op is applied. Give OP_OMAP_RMKEYRANGE its own case: decode the two strings and pass them to the two-string PGTransaction::omap_rmkeyrange() overload, which encodes them into the string[2] bufferlist internally. Signed-off-by: Sun Yuechi --- diff --git a/src/crimson/osd/ec_backend.cc b/src/crimson/osd/ec_backend.cc index dec93eaf087..63f3e856b61 100644 --- a/src/crimson/osd/ec_backend.cc +++ b/src/crimson/osd/ec_backend.cc @@ -176,6 +176,12 @@ struct ECCrimsonOp : ECCommon::RMWPipeline::Op { } break; case ceph::os::Transaction::OP_OMAP_RMKEYRANGE: + { + std::string first = i.decode_string(); + std::string last = i.decode_string(); + t_pg->omap_rmkeyrange(i.get_oid(op->oid).hobj, first, last); + } + break; case ceph::os::Transaction::OP_OMAP_SETHEADER: { ceph::bufferlist bl;