zcoo commented on code in PR #2837:
URL: https://github.com/apache/fluss/pull/2837#discussion_r2916261015
##########
fluss-server/src/main/java/org/apache/fluss/server/replica/ReplicaManager.java:
##########
@@ -326,6 +332,44 @@ public DefaultSnapshotContext getKvSnapshotContext() {
return kvSnapshotContext;
}
+ public int getMinInSyncReplicas() {
+ return minInSyncReplicas;
+ }
+
+ // ============ ServerReconfigurable Implementation ============
+
+ @Override
+ public void validate(Configuration newConfig) throws ConfigException {
+ // Type validation is already handled by DynamicServerConfig.
+ // Here we only do basic sanity checks.
+ int newMinInSyncReplicas =
+
newConfig.get(ConfigOptions.LOG_REPLICA_MIN_IN_SYNC_REPLICAS_NUMBER);
+ if (newMinInSyncReplicas <= 0) {
Review Comment:
I think it will cause problems. For "table.replication.factor" is a
table-level config, technically we should make
"ConfigOptions.LOG_REPLICA_MIN_IN_SYNC_REPLICAS_NUMBER" a table-level config
too. But for simplicity
I just add a check newMinInSyncReplicas to be only 1 or 2, which covers most
scenes.
--
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]