diff --git a/cloud/blockstore/libs/storage/volume/volume_actor_statvolume.cpp b/cloud/blockstore/libs/storage/volume/volume_actor_statvolume.cpp index 9d13949f7e..e3386232f1 100644 --- a/cloud/blockstore/libs/storage/volume/volume_actor_statvolume.cpp +++ b/cloud/blockstore/libs/storage/volume/volume_actor_statvolume.cpp @@ -295,8 +295,11 @@ void TVolumeActor::HandleStatVolume( partConfig->GetMaxTimedOutDeviceStateDuration().MilliSeconds()); } - TVector checkpoints = - State->GetCheckpointStore().GetCheckpointsWithData(); + TActiveCheckpointsMap activeCheckpoints = State->GetCheckpointStore().GetActiveCheckpoints(); + TVector checkpoints(Reserve(activeCheckpoints.size())); + for (const auto& [checkpoint, _] : activeCheckpoints) { + checkpoints.push_back(checkpoint); + } TStringBuilder debugString; for (const auto& statInfo: State->GetPartitionStatInfos()) { diff --git a/cloud/blockstore/libs/storage/volume/volume_ut_checkpoint.cpp b/cloud/blockstore/libs/storage/volume/volume_ut_checkpoint.cpp index 0b430ef75e..8d464a9944 100644 --- a/cloud/blockstore/libs/storage/volume/volume_ut_checkpoint.cpp +++ b/cloud/blockstore/libs/storage/volume/volume_ut_checkpoint.cpp @@ -914,6 +914,12 @@ Y_UNIT_TEST_SUITE(TVolumeCheckpointTest) UNIT_ASSERT_VALUES_EQUAL("c1", stat->Record.GetCheckpoints()[0]); } volume.DeleteCheckpointData("c1"); + { + auto stat = volume.StatVolume(); + UNIT_ASSERT_VALUES_EQUAL(1, stat->Record.GetCheckpoints().size()); + UNIT_ASSERT_VALUES_EQUAL("c1", stat->Record.GetCheckpoints()[0]); + } + volume.DeleteCheckpoint("c1"); { auto stat = volume.StatVolume(); UNIT_ASSERT(stat->Record.GetCheckpoints().empty()); @@ -1930,7 +1936,8 @@ Y_UNIT_TEST_SUITE(TVolumeCheckpointTest) { auto stat = volume.StatVolume(); const auto& cp = stat->Record.GetCheckpoints(); - UNIT_ASSERT_VALUES_EQUAL(0, cp.size()); + UNIT_ASSERT_VALUES_EQUAL(1, cp.size()); + UNIT_ASSERT_VALUES_EQUAL("c1", stat->Record.GetCheckpoints(0)); } volume.RebootTablet(); @@ -1940,7 +1947,8 @@ Y_UNIT_TEST_SUITE(TVolumeCheckpointTest) { auto stat = volume.StatVolume(); const auto& cp = stat->Record.GetCheckpoints(); - UNIT_ASSERT_VALUES_EQUAL(0, cp.size()); + UNIT_ASSERT_VALUES_EQUAL(1, cp.size()); + UNIT_ASSERT_VALUES_EQUAL("c1", stat->Record.GetCheckpoints(0)); } {