]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/ec_backend: fix OP_OMAP_RMKEYRANGE translation
authorSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 04:46:22 +0000 (12:46 +0800)
committerSun Yuechi <sunyuechi@iscas.ac.cn>
Wed, 1 Jul 2026 04:46:22 +0000 (12:46 +0800)
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 <sunyuechi@iscas.ac.cn>
src/crimson/osd/ec_backend.cc

index dec93eaf087bf5328b05985e413a01a5944b3ee9..63f3e856b619dc633c5c2bb1e6ddabba026f58bd 100644 (file)
@@ -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;