codelipenghui commented on code in PR #25304:
URL: https://github.com/apache/pulsar/pull/25304#discussion_r2920544516
##########
pulsar-common/src/main/java/org/apache/pulsar/common/naming/TopicName.java:
##########
@@ -372,12 +320,14 @@ public static String fromPersistenceNamingEncoding(String
mlName) {
localName = Codec.decode(parts.get(3));
return String.format("%s://%s/%s/%s", domain, tenant,
namespacePortion, localName);
} else if (parts.size() == 5) {
+ // Legacy V1 managed ledger name:
tenant/cluster/namespace/domain/topic
Review Comment:
**Warning (Critical):** For 5-part V1 managed ledger names like
`tenant/cluster/namespace/domain/topic`, the cluster is silently dropped,
producing `domain://tenant/namespace/topic`.
If the original V1 namespace was `tenant/cluster/namespace`, this maps the
topic to a V2 namespace `tenant/namespace` which may or may not exist. There's
no logging to help operators diagnose issues during migration.
Suggestion: add a warning log here:
```java
} else if (parts.size() == 5) {
log.warn("Converting V1 managed ledger name to V2 format, dropping
cluster component: {}", mlName);
...
```
--
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]