]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/SnapMapper: fix pacific legacy key conversion and introduce test 47133/head
authorManuel Lausch <manuel.lausch@1und1.de>
Thu, 30 Jun 2022 12:29:53 +0000 (14:29 +0200)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 17 Jul 2022 09:01:59 +0000 (09:01 +0000)
commit9b5fbb8cb80c1d606f138bdbdce62686c084207a
tree7edb1c182d2fcd2e2ff3e2598afe260c41924c19
parentbc7284a3d1e4cb88ce099a8c15575d65dbfc5de0
osd/SnapMapper: fix pacific legacy key conversion and introduce test

Octopus modified the SnapMapper key format from

  <LEGACY_MAPPING_PREFIX><snapid>_<shardid>_<hobject_t::to_str()>

to

  <MAPPING_PREFIX><pool>_<snapid>_<shardid>_<hobject_t::to_str()>

When this change was introduced, 94ebe0ea also introduced a conversion
with a crucial bug which essentially destroyed legacy keys by mapping them
to

  <MAPPING_PREFIX><poolid>_<snapid>_

without the object-unique suffix.  This commit fixes this conversion going
forward, but a fix for existing clusters still needs to be developed.

Fixes: https://tracker.ceph.com/issues/56147
Signed-off-by: Manuel Lausch <manuel.lausch@1und1.de>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 66bea86ab447b2db8a948c7913dc6c7a4a995c31)
src/osd/SnapMapper.cc
src/osd/SnapMapper.h
src/test/test_snap_mapper.cc