Skip to content

Commit

Permalink
Signal replicator is stopping if porducer is not created yet
Browse files Browse the repository at this point in the history
  • Loading branch information
rdhabalia committed Feb 22, 2017
1 parent d9b1b4c commit 9717f11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ public synchronized CompletableFuture<Void> disconnect(boolean failIfHasBacklog)
return closeProducerAsync();
} else {
// If there's already a reconnection happening, signal to close it whenever it's ready
STATE_UPDATER.set(this, State.Stopped);
STATE_UPDATER.set(this, State.Stopping);
}
return CompletableFuture.completedFuture(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ 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 9717f11

Please sign in to comment.