You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "dlg99 (via GitHub)" <gi...@apache.org> on 2023/04/10 19:28:47 UTC
[GitHub] [pulsar] dlg99 commented on a diff in pull request #19605: [feat] [broker] PIP-188 support blue-green cluster migration [part-2]
dlg99 commented on code in PR #19605:
URL: https://github.com/apache/pulsar/pull/19605#discussion_r1162016240
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java:
##########
@@ -1578,13 +1578,23 @@ 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: "
Review Comment:
Is it possible for isReplicationBacklogExist to become true later?
e.g. on one pass all replicators don't have backlog (isReplicationBacklogExist == false), next time one of the replicators gets more messages/backlog?
What guards against this case / is it a problem?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org