swuferhong commented on code in PR #3614:
URL: https://github.com/apache/fluss/pull/3614#discussion_r3599763036
##########
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:
This should have been caused by the state before commit 004e514b, where
`metadataCache` was initialized twice, so the `metadataCache` instance passed
as a constructor argument to `ReplicaCapacityController` got overwritten.
Adding the delay may cause many ITCases that rely on auto partition to fail.
We'd need to expose the delay as a config parameter so it can be configured in
tests. Could we do this in a follow-up PR?
--
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]