BewareMyPower commented on code in PR #23179:
URL: https://github.com/apache/pulsar/pull/23179#discussion_r1719234792
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -426,7 +425,7 @@ public PersistentTopic(String topic, ManagedLedger ledger,
BrokerService brokerS
this.transactionBuffer = new TransactionBufferDisable(this);
}
transactionBuffer.syncMaxReadPositionForNormalPublish(ledger.getLastConfirmedEntry(),
true);
- if (ledger instanceof ShadowManagedLedgerImpl) {
+ if (ledger.getConfig().getShadowSource() != null) {
Review Comment:
No need here because exception will be thrown in `TopicName.get` if the
shadow source is invalid (including blank string). Normally, the shadow source
could only be set by `createShadowTopic` so the shadow source should always be
a valid topic name or null unless the metadata store is hacked.
--
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]