lifepuzzlefun commented on code in PR #19793:
URL: https://github.com/apache/pulsar/pull/19793#discussion_r1135171900


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/MetadataStoreConfig.java:
##########
@@ -81,6 +84,39 @@ public class MetadataStoreConfig {
     @Builder.Default
     private final String metadataStoreName = "";
 
+    public static MetadataStoreConfigBuilder builder() {
+        return new CustomMetadataStoreConfigBuilder();
+    }
+
+    public static class CustomMetadataStoreConfigBuilder extends 
MetadataStoreConfigBuilder {
+
+        private String callerSetMetadataStoreName;
+
+        @Override
+        public MetadataStoreConfigBuilder metadataStoreName(String 
metadataStoreName) {
+            this.callerSetMetadataStoreName = metadataStoreName;
+            return super.metadataStoreName(metadataStoreName);
+        }
+
+        @Override
+        public MetadataStoreConfig build() {
+            if (Strings.isEmpty(this.callerSetMetadataStoreName)) {
+                Exception e = new Exception("stack trace");

Review Comment:
   yes, other modification is for this case not happen again and supply some 
method to find the wrong usage.
   
   the modification won't hurt production. 



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to