You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 83ac794
Browse filesBrowse the repository at this point in the historyBrowse files
Catch per-startup failures during ConfigNode leader warm-up
Within becomeLeader(), the parallel leader-service startups are joined with
CompletableFuture.allOf(startups).join(). startInParallelIfEpochCurrent()
ran startup.run() unguarded, so if any startup (CQ, pipe, subscription,
metrics, clusterId, ...) threw a RuntimeException, its future completed
exceptionally and join() rethrew it as a CompletionException out of
becomeLeader(). That aborted the transition before startExecutor() and
markLeaderServicesReadyIfEpochCurrent() ran, so leaderServicesReady never
flipped to true and the node kept returning CONFIG_NODE_LEADER_WARMING_UP
forever -- even though startInParallelIfEpochCurrent()'s Javadoc claimed the
future "always completes normally".
Make that claim true: each startup now catches and logs its own failure
(tagged with the service name via a small LeaderServiceStartup holder) and
never lets it escape. A single failing service stays unavailable until the
next leadership transition, but the node still finishes warming up and begins
serving, and the failure is observable through the error log.
Copy file name to clipboardExpand all lines: iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/consensus/statemachine/ConfigRegionStateMachine.java
+86-26Lines changed: 86 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -336,7 +336,9 @@ private void becomeLeader(final long epoch) {
0 commit comments