vineeth1995 commented on code in PR #19605:
URL: https://github.com/apache/pulsar/pull/19605#discussion_r1129801986
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1574,13 +1575,19 @@ private void buildProducerAndAddTopic(Topic topic, long
producerId, String produ
if (ex.getCause() instanceof
BrokerServiceException.TopicMigratedException) {
Optional<ClusterUrl> clusterURL =
getMigratedClusterUrl(service.getPulsar());
if (clusterURL.isPresent()) {
- log.info("[{}] redirect migrated producer to topic {}:
producerId={}, {}", remoteAddress, topicName,
- producerId, ex.getCause().getMessage());
- commandSender.sendTopicMigrated(ResourceType.Producer,
producerId,
- clusterURL.get().getBrokerServiceUrl(),
clusterURL.get().getBrokerServiceUrlTls());
- closeProducer(producer);
- return null;
-
+ if (topic.isReplicationBacklogExist()) {
+ log.info("Topic {} is migrated but replication backlog
exist: "
+ + "producerId = {}, producerName = {},
{}", topicName,
+ producerId, producerName,
ex.getCause().getMessage());
+ } else {
+ log.info("[{}] redirect migrated producer to topic {}:
"
+ + "producerId={}, producerName = {},
{}", remoteAddress,
+ topicName, producerId, producerName,
ex.getCause().getMessage());
+ commandSender.sendTopicMigrated(ResourceType.Producer,
producerId,
Review Comment:
@michaeljmarshall will handle this in a separate pr as this requires client
side change as well.
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1540,6 +1540,7 @@ private void buildProducerAndAddTopic(Topic topic, long
producerId, String produ
getPrincipal(), isEncrypted, metadata, schemaVersion, epoch,
userProvidedProducerName, producerAccessMode, topicEpoch,
supportsPartialProducer);
+ log.info("trying to add producer - {} to topic -{}", producerName,
topicName);
Review Comment:
addressed
--
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]