]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon, osd: Add objects trimmed to pg dump stats.
authorSridhar Seshasayee <sseshasa@redhat.com>
Thu, 17 Feb 2022 11:38:36 +0000 (17:08 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Tue, 15 Mar 2022 19:00:56 +0000 (00:30 +0530)
commit00249dc0cc69d4c065acbb33543d10cb360930dc
tree170f272d1df9bc3bdd81b09faaf98c679fa625e1
parent7a90a85500873ddea88982449856f02a304b1527
mon, osd: Add objects trimmed to pg dump stats.

Add a new column, OBJECTS_TRIMMED, to the pg dump stats that shows the
number of objects trimmed when a snap is removed.

When a pg splits, the stats from the parent pg is copied to the child
pg. In such a case, reset objects_trimmed to 0 for the child pg
(see PeeringState::split_into()). Otherwise, this will result in incorrect
stats to be shown for a child pg after the split operation.

Tests:
 - Librados C and C++ API tests to verify the number of objects trimmed
   during snaptrim operation. These tests use the self-managed snaps APIs.
 - Standalone tests to verify objects trimmed using rados pool snaps.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
qa/standalone/misc/test-snaptrim-stats.sh [new file with mode: 0755]
src/mon/PGMap.cc
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PrimaryLogPG.cc
src/osd/osd_types.cc
src/osd/osd_types.h
src/test/librados/CMakeLists.txt
src/test/librados/snapshots_stats.cc [new file with mode: 0644]
src/test/librados/snapshots_stats_cxx.cc [new file with mode: 0644]