Skip to content

Commit

Permalink
Avoid triggering startReplProducer on newAddProducer as it may flips …
Browse files Browse the repository at this point in the history
…replicator state wrongly
  • Loading branch information
rdhabalia committed Feb 22, 2017
1 parent 4ac21b4 commit d9b1b4c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public synchronized void startProducer() {
// BackOff before retrying
brokerService.executor().schedule(this::startProducer, waitTimeMs, TimeUnit.MILLISECONDS);
} else {
log.warn("[{}][{} -> {}] Failed to create remote producer. Replicator state: ", topicName,
log.warn("[{}][{} -> {}] Failed to create remote producer. Replicator state: {}", topicName,
localCluster, remoteCluster, STATE_UPDATER.get(this), ex);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,6 @@ public void addProducer(Producer producer) throws BrokerServiceException {
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] Added producer -- count: {}", topic, producer.getProducerName(), USAGE_COUNT_UPDATER.get(this));
}

// Start replication producers if not already
startReplProducers();
} finally {
lock.readLock().unlock();
}
Expand Down

0 comments on commit d9b1b4c

Please sign in to comment.