wuchong commented on code in PR #2378:
URL: https://github.com/apache/fluss/pull/2378#discussion_r2723896572
##########
fluss-server/src/main/java/org/apache/fluss/server/replica/ReplicaManager.java:
##########
@@ -459,9 +460,30 @@ public void maybeUpdateMetadataCache(int coordinatorEpoch,
ClusterMetadata clust
// check or apply coordinator epoch.
validateAndApplyCoordinatorEpoch(coordinatorEpoch,
"updateMetadataCache");
metadataCache.updateClusterMetadata(clusterMetadata);
+ updateReplicaTableConfig(clusterMetadata);
});
}
+ private void updateReplicaTableConfig(ClusterMetadata clusterMetadata) {
+ for (TableMetadata tableMetadata :
clusterMetadata.getTableMetadataList()) {
+ TableInfo tableInfo = tableMetadata.getTableInfo();
+ if (tableInfo.getTableConfig().getDataLakeFormat().isPresent()) {
+ long tableId = tableInfo.getTableId();
+ boolean dataLakeEnabled =
tableInfo.getTableConfig().isDataLakeEnabled();
+
+ for (Map.Entry<TableBucket, HostedReplica> entry :
allReplicas.entrySet()) {
Review Comment:
nit: The complexity is `O(M x N)` where M is the number of `TableMetadata`,
and N is the number of Replicas. We can improve the complexity to `O(M+N)`.
--
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]