jerrypeng commented on a change in pull request #9554:
URL: https://github.com/apache/pulsar/pull/9554#discussion_r574242046
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -109,6 +109,9 @@
protected volatile Optional<Long> topicEpoch = Optional.empty();
private volatile boolean hasExclusiveProducer;
+ // pointer to the exclusive producer
+ private volatile Producer exclusiveProducer;
Review comment:
We could. Just wanted to preserve the existing logging behavior.
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -382,17 +385,17 @@ public String getReplicatorPrefix() {
switch (producer.getAccessMode()) {
case Shared:
if (hasExclusiveProducer ||
!waitingExclusiveProducers.isEmpty()) {
- return FutureUtil.failedFuture(new ProducerBusyException(
- "Topic has an existing exclusive producer: " +
producers.keys().nextElement()));
+ return FutureUtil.failedFuture(
+ new ProducerFencedException("Topic has an existing
exclusive producer: " + exclusiveProducer));
Review comment:
good catch
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]