perf(selfop): route collected orders once after resolution
This commit is contained in:
+3
-1
@@ -190,8 +190,10 @@ public class SelfopDiscoveryService {
|
||||
SelfopProgressProjection.freezeRun(currentFetchTask,currentFetchRun);currentFetchRun.setStatus("ROUTED");currentFetchRun.setFetchFinishedAtUtc(utcNow());currentFetchRun.setFinishedAtUtc(utcNow());currentFetchRun.setUpdatedAt(utcNow());runs.updateById(currentFetchRun);
|
||||
currentFetchTask.setStatus("SUCCEEDED");currentFetchTask.setUpdatedAt(utcNow());tasks.updateById(currentFetchTask);}
|
||||
});
|
||||
route(task,run,manifest,lease,false);
|
||||
}
|
||||
// Child tasks stay WAITING_SOURCE until all orders are resolved. Rebuilding every
|
||||
// warehouse manifest after each order made this loop quadratic in directory size.
|
||||
// A resumed attempt projects its current references before entering the loop.
|
||||
// A directory warehouse is provisional until every account order (including resumed
|
||||
// revision checks) has resolved. An empty warehouse must not publish a false zero early.
|
||||
route(task,run,manifest,lease,true);
|
||||
|
||||
Reference in New Issue
Block a user