Skip to content

Commit a261c7b

Browse files
authored
Statistics: more logging (#8480)
1 parent 6929ea6 commit a261c7b

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

ydb/core/statistics/aggregator/aggregator_impl.cpp

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -660,26 +660,30 @@ void TStatisticsAggregator::ScheduleNextTraversal(NIceDb::TNiceDb& db) {
660660
if (!LastTraversalWasForce) {
661661
LastTraversalWasForce = true;
662662

663-
for (TForceTraversalOperation& operation : ForceTraversals) {
664-
for (TForceTraversalTable& operationTable : operation.Tables) {
665-
if (operationTable.Status == TForceTraversalTable::EStatus::AnalyzeFinished) {
666-
UpdateForceTraversalTableStatus(TForceTraversalTable::EStatus::TraversalStarted, operation.OperationId, operationTable, db);
667-
pathId = operationTable.PathId;
668-
break;
663+
if (ForceTraversals.empty()) {
664+
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. No force traversals.");
665+
} else {
666+
for (TForceTraversalOperation& operation : ForceTraversals) {
667+
for (TForceTraversalTable& operationTable : operation.Tables) {
668+
if (operationTable.Status == TForceTraversalTable::EStatus::AnalyzeFinished) {
669+
UpdateForceTraversalTableStatus(TForceTraversalTable::EStatus::TraversalStarted, operation.OperationId, operationTable, db);
670+
pathId = operationTable.PathId;
671+
break;
672+
}
673+
}
674+
675+
if (!pathId) {
676+
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal tables sent the requests. OperationId=" << operation.OperationId);
677+
continue;
669678
}
679+
680+
ForceTraversalOperationId = operation.OperationId;
681+
break;
670682
}
671-
683+
672684
if (!pathId) {
673-
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal tables sent the requests. OperationId=" << operation.OperationId);
674-
continue;
685+
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal operations sent the requests.");
675686
}
676-
677-
ForceTraversalOperationId = operation.OperationId;
678-
break;
679-
}
680-
681-
if (!pathId) {
682-
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal operations sent the requests.");
683687
}
684688
}
685689

0 commit comments

Comments
 (0)