@@ -14,7 +14,7 @@ namespace NKikimr {
1414 , LogPrefix(VCtx->VDiskLogPrefix)
1515 , Counters(VCtx->VDiskCounters->GetSubgroup (" subsystem" , " scrub" ))
1616 , MonGroup(Counters)
17- , DeepScrubbingGroup (VCtx->VDiskCounters->GetSubgroup (" subsystem" , " deepScrubbing" ))
17+ , DeepScrubbingSubgroups (VCtx->VDiskCounters->GetSubgroup (" subsystem" , " deepScrubbing" ))
1818 , Arena(&TScrubCoroImpl::AllocateRopeArenaChunk)
1919 , ScrubEntrypoint(std::move(scrubEntrypoint))
2020 , ScrubEntrypointLsn(scrubEntrypointLsn)
@@ -239,38 +239,63 @@ namespace NKikimr {
239239
240240 void TScrubCoroImpl::CheckIntegrity (const TLogoBlobID& blobId, bool isHuge) {
241241 SendToBSProxy (SelfActorId, Info->GroupID , new TEvBlobStorage::TEvCheckIntegrity (blobId, TInstant::Max (),
242- NKikimrBlobStorage::EGetHandleClass::LowRead));
242+ NKikimrBlobStorage::EGetHandleClass::LowRead, true ));
243243 auto res = WaitForPDiskEvent<TEvBlobStorage::TEvCheckIntegrityResult>();
244244
245- if (isHuge) {
246- ++DeepScrubbingGroup.HugeBlobsChecked ();
247- } else {
248- ++DeepScrubbingGroup.SmallBlobsChecked ();
245+ TErasureType::EErasureSpecies erasure = Info->Type .GetErasure ();
246+
247+ NMonGroup::TDeepScrubbingGroup* counters = DeepScrubbingSubgroups.GetCounters (isHuge, erasure);
248+ if (counters) {
249+ ++counters->BlobsChecked ();
249250 }
250251
251252 if (res->Get ()->Status != NKikimrProto::OK) {
252253 STLOGX (GetActorContext (), PRI_WARN, BS_VDISK_SCRUB, VDS97, VDISKP (LogPrefix, " TEvCheckIntegrity request failed" ),
253254 (BlobId, blobId), (ErrorReason, res->Get ()->ErrorReason ));
254- ++DeepScrubbingGroup.CheckIntegrityErrors ();
255+ if (counters) {
256+ ++counters->CheckIntegrityErrors ();
257+ }
255258 } else {
256- ++DeepScrubbingGroup.CheckIntegritySuccesses ();
257- if (res->Get ()->PlacementStatus != TEvBlobStorage::TEvCheckIntegrityResult::PS_OK) {
259+ if (counters) {
260+ ++counters->CheckIntegritySuccesses ();
261+ }
262+
263+ switch (res->Get ()->PlacementStatus ) {
264+ case TEvBlobStorage::TEvCheckIntegrityResult::PS_UNKNOWN:
265+ case TEvBlobStorage::TEvCheckIntegrityResult::PS_REPLICATION_IN_PROGRESS:
266+ if (counters) {
267+ ++counters->UnknownPlacementStatus ();
268+ }
269+ break ;
270+ case TEvBlobStorage::TEvCheckIntegrityResult::PS_BLOB_IS_LOST:
271+ case TEvBlobStorage::TEvCheckIntegrityResult::PS_BLOB_IS_RECOVERABLE:
258272 STLOGX (GetActorContext (), PRI_CRIT, BS_VDISK_SCRUB, VDS98, VDISKP (LogPrefix, " TEvCheckIntegrity discovered placement issue" ),
259- (BlobId, blobId), (CheckIntegrityResult, res->Get ()->ToString ()));
260- if (isHuge) {
261- ++DeepScrubbingGroup.PlacementIssuesHugeBlobs ();
262- } else {
263- ++DeepScrubbingGroup.PlacementIssuesSmallBlobs ();
273+ (BlobId, blobId), (Erasure, TErasureType::ErasureSpeciesName (erasure)), (CheckIntegrityResult, res->Get ()->ToString ()));
274+ if (counters) {
275+ ++counters->PlacementIssues ();
264276 }
277+ break ;
278+ case TEvBlobStorage::TEvCheckIntegrityResult::PS_OK:
279+ default :
280+ break ; // nothing to do
265281 }
266- if (res->Get ()->DataStatus != TEvBlobStorage::TEvCheckIntegrityResult::DS_OK) {
282+
283+ switch (res->Get ()->DataStatus ) {
284+ case TEvBlobStorage::TEvCheckIntegrityResult::DS_UNKNOWN:
285+ if (counters) {
286+ ++counters->UnknownDataStatus ();
287+ }
288+ break ;
289+ case TEvBlobStorage::TEvCheckIntegrityResult::DS_ERROR:
267290 STLOGX (GetActorContext (), PRI_CRIT, BS_VDISK_SCRUB, VDS99, VDISKP (LogPrefix, " TEvCheckIntegrity discovered data issue" ),
268- (BlobId, blobId), (CheckIntegrityResult, res->Get ()->ToString ()));
269- if (isHuge) {
270- ++DeepScrubbingGroup.DataIssuesHugeBlobs ();
271- } else {
272- ++DeepScrubbingGroup.DataIssuesSmallBlobs ();
291+ (BlobId, blobId), (Erasure, TErasureType::ErasureSpeciesName (erasure)), (CheckIntegrityResult, res->Get ()->ToString ()));
292+ if (counters) {
293+ ++counters->DataIssues ();
273294 }
295+ break ;
296+ case TEvBlobStorage::TEvCheckIntegrityResult::DS_OK:
297+ default :
298+ break ; // nothing to do
274299 }
275300 }
276301 }
0 commit comments