]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd/osd_operations/snaptrim_event: don't process snaptrim events
authorXuehan Xu <xuxuehan@qianxin.com>
Sun, 6 Aug 2023 07:45:24 +0000 (15:45 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 11 Oct 2023 11:53:06 +0000 (11:53 +0000)
commit2a148f7ee6dbe7d8f60a217c683c8cae58aa9680
tree6d5d17a4f888ce8f67fed9e0422f98594e01df90
parent3334592f9415543c0deeabcf694201a5e4312063
crimson/osd/osd_operations/snaptrim_event: don't process snaptrim events
of the same PG concurrently

Concurrently triming snaps of the same PG may lead to the following
problem:

1. fiber 1 get objects to trim for PG 1.x and snapid 1.d, which involves
   object OBJ;
2. fiber 2 get objects to trim for PG 1.x and snapid 1.c, which also
   involes object OBJ;
3. fiber 1 removes snap 1.c since it has been removed in the osdmap
4. fiber 2 try to get obc for object OBJ and find that OBJ doesn't have
   snap for id 1.c

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 267babe435a54130eda5770a537420fb516e2a8f)
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/osd_operations/snaptrim_event.h
src/crimson/osd/pg.h