]> 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)
committerXuehan Xu <xuxuehan@qianxin.com>
Sun, 6 Aug 2023 08:06:51 +0000 (16:06 +0800)
commit267babe435a54130eda5770a537420fb516e2a8f
tree44de18dd886d64e2e3cb2b9491c3a0b0eda4c8ac
parent957fd43e4b09a7607d4db52fe9674be905f76de8
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>
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/osd_operations/snaptrim_event.h
src/crimson/osd/pg.h