loserwang1024 commented on code in PR #3645:
URL: https://github.com/apache/fluss/pull/3645#discussion_r3584365339
##########
fluss-server/src/main/java/org/apache/fluss/server/DynamicConfigManager.java:
##########
@@ -40,21 +40,26 @@
import java.util.Map;
import java.util.Objects;
-/** Manager for dynamic configurations. */
+/**
+ * Manager for dynamic configurations.
+ *
+ * <p>Used by both the CoordinatorServer and the TabletServer. Every instance,
regardless of server
+ * role or leadership status, continuously applies dynamic config-change
notifications from
+ * ZooKeeper. In particular a standby CoordinatorServer keeps tracking changes
so that, once it is
+ * promoted to leader, its components (e.g. SASL credentials) already reflect
the latest config
+ * rather than a stale snapshot taken at startup.
+ */
public class DynamicConfigManager {
private static final Logger LOG =
LoggerFactory.getLogger(DynamicConfigManager.class);
private static final long CHANGE_NOTIFICATION_EXPIRATION_MS = 15 * 60 *
1000L;
private final DynamicServerConfig dynamicServerConfig;
private final ZooKeeperClient zooKeeperClient;
private final ZkNodeChangeNotificationWatcher configChangeListener;
- private final boolean isCoordinator;
- public DynamicConfigManager(
- ZooKeeperClient zooKeeperClient, Configuration configuration,
boolean isCoordinator) {
Review Comment:
As discussed, please only allow the follower coordinator to subscribe to
ZooKeeper notifications. The leader already maintains the latest configuration
changes, so having it subscribe here may cause version rollback issues (e.g., A
→ B → A). When a follower transitions to become the leader, please disable the
subscription at that point.
--
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]