Skip to content

Commit

Permalink
Statistics: more logging (ydb-platform#8480)
Browse files Browse the repository at this point in the history
  • Loading branch information
azevaykin authored Aug 30, 2024
1 parent 6929ea6 commit a261c7b
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions ydb/core/statistics/aggregator/aggregator_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,26 +660,30 @@ void TStatisticsAggregator::ScheduleNextTraversal(NIceDb::TNiceDb& db) {
if (!LastTraversalWasForce) {
LastTraversalWasForce = true;

for (TForceTraversalOperation& operation : ForceTraversals) {
for (TForceTraversalTable& operationTable : operation.Tables) {
if (operationTable.Status == TForceTraversalTable::EStatus::AnalyzeFinished) {
UpdateForceTraversalTableStatus(TForceTraversalTable::EStatus::TraversalStarted, operation.OperationId, operationTable, db);
pathId = operationTable.PathId;
break;
if (ForceTraversals.empty()) {
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. No force traversals.");
} else {
for (TForceTraversalOperation& operation : ForceTraversals) {
for (TForceTraversalTable& operationTable : operation.Tables) {
if (operationTable.Status == TForceTraversalTable::EStatus::AnalyzeFinished) {
UpdateForceTraversalTableStatus(TForceTraversalTable::EStatus::TraversalStarted, operation.OperationId, operationTable, db);
pathId = operationTable.PathId;
break;
}
}

if (!pathId) {
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal tables sent the requests. OperationId=" << operation.OperationId);
continue;
}

ForceTraversalOperationId = operation.OperationId;
break;
}

if (!pathId) {
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal tables sent the requests. OperationId=" << operation.OperationId);
continue;
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal operations sent the requests.");
}

ForceTraversalOperationId = operation.OperationId;
break;
}

if (!pathId) {
SA_LOG_D("[" << TabletID() << "] ScheduleNextTraversal. All the force traversal operations sent the requests.");
}
}

Expand Down

0 comments on commit a261c7b

Please sign in to comment.