Skip to content

Commit

Permalink
[Broker] Synchronize updates to the inactiveProducers map in MessageD…
Browse files Browse the repository at this point in the history
…eduplication (apache#12820)

(cherry picked from commit 9994614)
(cherry picked from commit e12bcc2)
  • Loading branch information
michaeljmarshall authored and lhotari committed Dec 10, 2021
1 parent 2f9e3d7 commit acd9202
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public MessageDeduplication(PulsarService pulsar, PersistentTopic topic, Managed
private CompletableFuture<Void> recoverSequenceIdsMap() {
// Load the sequence ids from the snapshot in the cursor properties
managedCursor.getProperties().forEach((k, v) -> {
inactiveProducers.put(k, System.currentTimeMillis());
producerRemoved(k);
highestSequencedPushed.put(k, v);
highestSequencedPersisted.put(k, v);
});
Expand Down Expand Up @@ -172,7 +172,7 @@ public void readEntriesComplete(List<Entry> entries, Object ctx) {
long sequenceId = Math.max(md.getHighestSequenceId(), md.getSequenceId());
highestSequencedPushed.put(producerName, sequenceId);
highestSequencedPersisted.put(producerName, sequenceId);
inactiveProducers.put(producerName, System.currentTimeMillis());
producerRemoved(producerName);

entry.release();
}
Expand Down

0 comments on commit acd9202

Please sign in to comment.