heesung-sn commented on code in PR #21668:
URL: https://github.com/apache/pulsar/pull/21668#discussion_r1414505512
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -652,6 +652,20 @@ public void addComplete(Position pos, ByteBuf entryData,
Object ctx) {
@Override
public synchronized void addFailed(ManagedLedgerException exception,
Object ctx) {
PublishContext callback = (PublishContext) ctx;
+
+ /* If the topic is being transferred(in the Releasing bundle state),
+ we don't want to forcefully close topic here.
+ Instead, we will rely on the service unit state channel's
bundle(topic) transfer protocol.
+ At the end of the transfer protocol, at Owned state, the source
broker should close the topic properly.
+ */
+ if (isClosingOrDeleting
+ &&
ExtensibleLoadManagerImpl.isLoadManagerExtensionEnabled(getBrokerService().pulsar()))
{
+ if (log.isDebugEnabled()) {
+ log.debug("[{}] Failed to persist msg in store: {} while
closing or deleting.",
+ topic, exception.getMessage(), exception);
+ }
+ return;
+ }
Review Comment:
I think the callback is used to signal clients to additionally handle this
case on the clients as well. In this case, we don't need to send any to the
clients.
--
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]