@@ -872,13 +872,20 @@ struct TSchemeShard::TTxMonitoring : public NTabletFlatExecutor::TTransactionBas
872
872
873
873
}
874
874
875
- TVector<NScheme::TTypeInfo> keyTypes;
876
- if (Self->Tables .contains (info.TablePathId )) {
877
- TTableInfo::TPtr tableInfo = Self->Tables .at (info.TablePathId );
878
- for (ui32 keyPos: tableInfo->KeyColumnIds ) {
879
- keyTypes.push_back (tableInfo->Columns .at (keyPos).PType );
875
+ auto getKeyTypes = [&](TPathId pathId) {
876
+ TVector<NScheme::TTypeInfo> keyTypes;
877
+
878
+ auto tableInfo = Self->Tables .FindPtr (pathId);
879
+ if (!tableInfo) {
880
+ return keyTypes;
881
+ }
882
+
883
+ for (ui32 keyPos: tableInfo->Get ()->KeyColumnIds ) {
884
+ keyTypes.push_back (tableInfo->Get ()->Columns .at (keyPos).PType );
880
885
}
881
- }
886
+
887
+ return keyTypes;
888
+ };
882
889
883
890
{
884
891
TAG (TH3) {str << " Shards : " << info.Shards .size () << " \n " ;}
@@ -907,23 +914,31 @@ struct TSchemeShard::TTxMonitoring : public NTabletFlatExecutor::TTransactionBas
907
914
if (Self->ShardInfos .contains (idx)) {
908
915
str << Self->ShardInfos .at (idx).TabletID ;
909
916
} else {
910
- str << " shard " << idx << " has been dropped " ;
917
+ str << " deleted shard " ;
911
918
}
912
919
}
913
920
TABLED () {
914
- if (keyTypes) {
915
- str << DebugPrintRange (keyTypes, status.Range .ToTableRange (), *AppData ()->TypeRegistry );
921
+ if (Self->ShardInfos .contains (idx)) {
922
+ if (auto keyTypes = getKeyTypes (Self->ShardInfos .at (idx).PathId )) {
923
+ str << DebugPrintRange (keyTypes, status.Range .ToTableRange (), *AppData ()->TypeRegistry );
924
+ } else {
925
+ str << " deleted table" ;
926
+ }
916
927
} else {
917
- str << " table has been dropped " ;
928
+ str << " deleted shard " ;
918
929
}
919
930
}
920
931
TABLED () {
921
- if (keyTypes) {
922
- TSerializedCellVec vec;
923
- vec.Parse (status.LastKeyAck );
924
- str << DebugPrintPoint (keyTypes, vec.GetCells (), *AppData ()->TypeRegistry );
932
+ if (Self->ShardInfos .contains (idx)) {
933
+ if (auto keyTypes = getKeyTypes (Self->ShardInfos .at (idx).PathId )) {
934
+ TSerializedCellVec vec;
935
+ vec.Parse (status.LastKeyAck );
936
+ str << DebugPrintPoint (keyTypes, vec.GetCells (), *AppData ()->TypeRegistry );
937
+ } else {
938
+ str << " deleted table" ;
939
+ }
925
940
} else {
926
- str << " table has been dropped " ;
941
+ str << " deleted shard " ;
927
942
}
928
943
}
929
944
TABLED () {
0 commit comments