wuchong commented on code in PR #3614:
URL: https://github.com/apache/fluss/pull/3614#discussion_r3597346895
##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorEventProcessor.java:
##########
@@ -319,20 +323,6 @@ public void startup() {
throw new FlussRuntimeException("Fail to initialize coordinator
context.", e);
}
- // We need to send UpdateMetadataRequest after the coordinator context
is initialized and
- // before the state machines in tableManager are started. This is
because tablet servers
- // need to receive the list of live tablet servers from
UpdateMetadataRequest before they
- // can process the LeaderRequests that are generated by
replicaStateMachine.startup() and
- // partitionStateMachine.startup().
- // update coordinator metadata cache when CoordinatorServer start.
- HashSet<ServerInfo> tabletServerInfoList =
- new
HashSet<>(coordinatorContext.getLiveTabletServers().values());
- serverMetadataCache.updateMetadata(
- coordinatorContext.getCoordinatorServerInfo(),
- tabletServerInfoList,
- coordinatorContext.getServerTags());
- updateTabletServerMetadataCacheWhenStartup(tabletServerInfoList);
Review Comment:
Is the failed case related to this change?
By the way, I believe it is acceptable if the auto-partition manager starts
before the metadata cache update, as this does not cause server failure. The
task will be rescheduled at the next interval, and the partition will
eventually be created. On the other hand, we should add a delay (e.g., `1min`)
to the schedule in the auto-partition manager instead of using `0`. Starting
immediately is risky because the server is typically busy during startup.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]