horizonzy commented on code in PR #17192:
URL: https://github.com/apache/pulsar/pull/17192#discussion_r950987709


##########
pulsar-metadata/src/main/java/org/apache/pulsar/metadata/bookkeeper/PulsarLedgerIdGenerator.java:
##########
@@ -287,4 +288,16 @@ private static String createLedgerPrefix(String 
ledgersPath, String idGenZnodeNa
         return ledgerIdGenPath + "/" + "ID-";
     }
 
+    //If the config rootPath when use zk metadata store, it will append 
rootPath as the prefix of the path.
+    //So when we get the path from the stat, we should truncate the rootPath.
+    private String handleTheDeletePath(String path) {
+        if (store instanceof ZKMetadataStore) {
+            String rootPath = ((ZKMetadataStore) store).getRootPath();

Review Comment:
   The `metadataServiceUriStr` is `metadata-store:127.0.0.1:2181/test`, it's 
not a standard schema, so we can't resolve the path correctly in 
`AbstractMetadataDriver#resolveLedgersRootPath`.



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