]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/PGLog: set acceptable rollback_info_trimmed_to for pg of replicated pool 42445/head
authorMingxin Liu <mingxin@xsky.com>
Thu, 22 Jul 2021 04:21:53 +0000 (12:21 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 26 Jul 2021 03:58:11 +0000 (11:58 +0800)
commitc5b38306d7ab5a533a54828dafab3a386223b969
treea474e0e142a1acf967649a7cd83dd77c52a1066d
parent4fc80fe0940d52bb50e3ccfee84306bf9f9d27a6
osd/PGLog: set acceptable rollback_info_trimmed_to for pg of replicated pool

if this PG belongs to a replica pool, since replica pool does not
require rollback, see `pg_pool_t::require_rollback()`, we don't
update the omap entry for noting down the
`on_disk_rollback_info_trimmed_to`. see
`PGLog::_write_log_and_missing()` and `PGLog::_write_log_and_missing()`.
in this case, `read_log_and_missing()` should not be able to find
the value for "rollback_info_trimmed_to" in the omap entries.

because `roll_foward_to()` replays all entries starting at
`rollback_info_trimmed_to`, if it is empty, when the primary osd
is merging the pglog from its peers while peering, it would have
to walk through *all* pglog entries. this would incur unnecessary
overhead, and slows down the peering.

in this change, if this PG belongs to a replica pool, we just fast
forward it to `info.last_update` to avoid this overhead.

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
src/osd/PGLog.cc
src/osd/PGLog.h