]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/hobject: fix hobject_t::to_str() 56142/head
authorMatan Breizman <mbreizma@redhat.com>
Tue, 12 Mar 2024 16:54:21 +0000 (16:54 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 12 Mar 2024 16:54:21 +0000 (16:54 +0000)
Introduced in: e462f76aedbb89e8db57dc2324d4f5e9fe54cf9e
Causing the following failures:
```
[  FAILED  ] SnapMapperTest.CheckObjectKeyFormat
[  FAILED  ] SnapMapperTest.CheckRawKeyFormat
```
with the following error:
```
2024-03-09T17:31:57.117 INFO:teuthology.orchestra.run.smithi060.stdout:Expected equality of these values:
2024-03-09T17:31:57.117 INFO:teuthology.orchestra.run.smithi060.stdout:  object_key
2024-03-09T17:31:57.117 INFO:teuthology.orchestra.run.smithi060.stdout:    Which is: "OBJ_.1_7FFFFFFFFFFFFFEB.76543210.FFFFFFFFFFFFFFEC.test%uobject..namespace"
2024-03-09T17:31:57.117 INFO:teuthology.orchestra.run.smithi060.stdout:  test_object_key
2024-03-09T17:31:57.117 INFO:teuthology.orchestra.run.smithi060.stdout:    Which is: "OBJ_.1_7FFFFFFFFFFFFFEB.76543210.ffffffffffffffec.test%uobject..namespace"
```

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/common/hobject.cc

index 9f8e67f10b8b49141297e1bce272188c8a5b0f0f..01a117c70849432b54dae6754f4c450c7d958f7c 100644 (file)
@@ -94,7 +94,7 @@ string hobject_t::to_str() const
     out = fmt::format(FMT_COMPILE("{:016X}.{:08X}.snapdir."), poolid, revhash);
   } else {
     out = fmt::format(
-       FMT_COMPILE("{:016X}.{:08X}.{:X}."), poolid, revhash,
+       FMT_COMPILE("{:016X}.{:08X}.{:x}."), poolid, revhash,
        (unsigned long long)snap);
   }