@@ -660,26 +660,30 @@ void TStatisticsAggregator::ScheduleNextTraversal(NIceDb::TNiceDb& db) {
660
660
if (!LastTraversalWasForce) {
661
661
LastTraversalWasForce = true ;
662
662
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 ;
669
678
}
679
+
680
+ ForceTraversalOperationId = operation.OperationId ;
681
+ break ;
670
682
}
671
-
683
+
672
684
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." );
675
686
}
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." );
683
687
}
684
688
}
685
689
0 commit comments