@@ -676,33 +676,60 @@ public:
676676 COUNTER_DEF (BlobsFixed);
677677 };
678678
679+ // /////////////////////////////////////////////////////////////////////////////////
680+ // TDeepScrubbingGroup
681+ // /////////////////////////////////////////////////////////////////////////////////
679682 class TDeepScrubbingGroup : public TBase {
680683 public:
681684 GROUP_CONSTRUCTOR (TDeepScrubbingGroup)
682685 {
683- COUNTER_INIT (SmallBlobsChecked, true );
684- COUNTER_INIT (HugeBlobsChecked, true );
685- COUNTER_INIT (CheckIntegritySuccesses, false );
686- COUNTER_INIT (CheckIntegrityErrors, false );
687-
688- COUNTER_INIT (PlacementIssuesSmallBlobs, false );
689- COUNTER_INIT (DataIssuesSmallBlobs, false );
690-
691- COUNTER_INIT (PlacementIssuesHugeBlobs, false );
692- COUNTER_INIT (DataIssuesHugeBlobs, false );
686+ COUNTER_INIT (BlobsChecked, true );
687+ COUNTER_INIT (CheckIntegritySuccesses, true );
688+ COUNTER_INIT (CheckIntegrityErrors, true );
689+ COUNTER_INIT (UnknownDataStatus, true );
690+ COUNTER_INIT (UnknownPlacementStatus, true );
691+ COUNTER_INIT (DataIssues, true );
692+ COUNTER_INIT (PlacementIssues, true );
693693 }
694694
695- COUNTER_DEF (SmallBlobsChecked);
696- COUNTER_DEF (HugeBlobsChecked);
697-
695+ COUNTER_DEF (BlobsChecked);
698696 COUNTER_DEF (CheckIntegritySuccesses);
699697 COUNTER_DEF (CheckIntegrityErrors);
698+ COUNTER_DEF (UnknownDataStatus);
699+ COUNTER_DEF (UnknownPlacementStatus);
700+ COUNTER_DEF (DataIssues);
701+ COUNTER_DEF (PlacementIssues);
702+ };
700703
701- COUNTER_DEF (PlacementIssuesSmallBlobs);
702- COUNTER_DEF (DataIssuesSmallBlobs);
704+ class TDeepScrubbingSubgroups {
705+ public:
706+ TDeepScrubbingSubgroups (TIntrusivePtr<NMonitoring::TDynamicCounters> counters) {
707+ for (bool isHuge : {true , false }) {
708+ for (TErasureType::EErasureSpecies erasure :
709+ {TErasureType::ErasureNone, TErasureType::Erasure4Plus2Block,
710+ TErasureType::ErasureMirror3of4, TErasureType::ErasureMirror3dc}) {
711+ ::NMonitoring::TDynamicCounterPtr subgroup = counters
712+ ->GetSubgroup (" blobSize" , isHuge ? " huge" : " small" )
713+ ->GetSubgroup (" erasure" , TErasureType::ErasureSpeciesName (erasure));
714+ Subgroups.insert ({GetKey (isHuge, erasure), TDeepScrubbingGroup (subgroup)});
715+ }
716+ }
717+ }
718+
719+ TDeepScrubbingGroup* GetCounters (bool isHuge, TErasureType::EErasureSpecies erasure) {
720+ auto it = Subgroups.find (GetKey (isHuge, erasure));
721+ if (it == Subgroups.end ()) {
722+ return nullptr ;
723+ }
724+ return &it->second ;
725+ }
703726
704- COUNTER_DEF (PlacementIssuesHugeBlobs);
705- COUNTER_DEF (DataIssuesHugeBlobs);
727+ private:
728+ std::unordered_map<ui64, TDeepScrubbingGroup> Subgroups;
729+
730+ ui64 GetKey (bool isHuge, TErasureType::EErasureSpecies erasure) {
731+ return ((ui64)isHuge << 32 ) + (ui64)erasure;
732+ }
706733 };
707734
708735 } // NMonGroup
0 commit comments