BewareMyPower commented on code in PR #23301:
URL: https://github.com/apache/pulsar/pull/23301#discussion_r1766098295


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/ServiceConfiguration.java:
##########
@@ -2874,6 +2874,25 @@ public double 
getLoadBalancerBandwidthOutResourceWeight() {
     )
     private boolean loadBalancerMultiPhaseBundleUnload = true;
 
+    @FieldContext(
+            dynamic = false,
+            category = CATEGORY_LOAD_BALANCER,
+            doc = "Name of ServiceUnitStateTableView implementation class to 
use"
+    )
+    private String loadManagerServiceUnitStateTableViewClassName =
+            
"org.apache.pulsar.broker.loadbalance.extensions.channel.ServiceUnitStateTableViewImpl";
+
+    @FieldContext(
+            dynamic = true,
+            category = CATEGORY_LOAD_BALANCER,
+            doc = "Specify ServiceUnitTableViewSyncer to sync service 
unit(bundle) states between metadata store and "
+                    + "system topic table views during migration from one to 
the other. One could enable this"
+                    + " syncer before migration and disable it after the 
migration finishes. "
+                    + "It accepts `MetadataStoreToSystemTopicSyncer` or 
`SystemTopicToMetadataStoreSyncer` to "
+                    + "enable it. Null value disables it."
+    )
+    private ServiceUnitTableViewSyncerType 
loadBalancerServiceUnitTableViewSyncer = null;

Review Comment:
   This config is inconsistent with the PIP-378, see 
https://github.com/apache/pulsar/blob/master/pip/pip-378.md#configuration
   
   > Add a loadBalancerServiceUnitTableViewSyncerEnabled configuration to to 
enable ServiceUnitTableViewSyncer to sync metadata store and system topic 
ServiceUnitStateTableView during migration.
   
   It makes sense because we have two syncer implementations, but it's not 
friendly to users for how to configure it in the `broker.conf`. Could you use 
an `enum` instead of `null` for it?
   
   ```java
       private ServiceUnitTableViewSyncerType 
loadBalancerServiceUnitTableViewSyncer = ServiceUnitTableViewSyncerType.None;
   
       public enum ServiceUnitTableViewSyncerType {
           None,
           MetadataStoreToSystemTopicSyncer,
           SystemTopicToMetadataStoreSyncer
       }
   ```
   
   Then we can update the `broker.conf` again to include this config.



-- 
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]

Reply via email to