@@ -466,6 +466,28 @@ bool TPDisk::ProcessChunk0(const NPDisk::TEvReadLogResult &readLogResult, TStrin
466466 return true ;
467467}
468468
469+ static void PrintCondensedChunksList (TStringStream& str, const std::vector<ui32>& chunks) {
470+ str << " [" ;
471+ bool first = true ;
472+ std::optional<TChunkIdx> begin;
473+ for (size_t i = 0 ; i < chunks.size (); ++i) {
474+ if (!begin) {
475+ begin = chunks[i];
476+ }
477+ if (i + 1 < chunks.size () && chunks[i] + 1 == chunks[i + 1 ]) {
478+ continue ;
479+ }
480+ str << (std::exchange (first, false ) ? " " : " " );
481+ if (*begin == chunks[i]) {
482+ str << chunks[i];
483+ } else {
484+ str << *begin << " -" << chunks[i];
485+ }
486+ begin.reset ();
487+ }
488+ str << " ];" ;
489+ }
490+
469491void TPDisk::PrintChunksDebugInfo () {
470492 auto print = [&] () {
471493 std::map<TOwner, std::vector<ui32>> ownerToChunks;
@@ -479,17 +501,13 @@ void TPDisk::PrintChunksDebugInfo() {
479501 str << " PDiskId# " << PDiskId << " PrintChunksDebugInfo; " ;
480502 for (auto & [owner, chunks] : ownerToChunks) {
481503 std::sort (chunks.begin (), chunks.end ());
482- str << " Owner# " << owner << " [" ;
483- bool first = true ;
484- for (auto idx : chunks) {
485- str << (std::exchange (first, false ) ? " " : " " ) << idx;
486- }
487- str << " ];" ;
504+ str << " Owner# " << owner;
505+ PrintCondensedChunksList (str, chunks);
488506 }
489507 return str.Str ();
490508 };
491509
492- LOG_INFO_S (*ActorSystem, NKikimrServices::BS_PDISK, print ());
510+ LOG_DEBUG_S (*ActorSystem, NKikimrServices::BS_PDISK, print ());
493511}
494512
495513TRcBuf TPDisk::ProcessReadSysLogResult (ui64 &outWritePosition, ui64 &outLsn,
0 commit comments