Skip to content

Commit

Permalink
add synchronized for recoverBucketSnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
coderzc committed Dec 20, 2022
1 parent 9e0aed6 commit a7628e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public BucketDelayedDeliveryTracker(PersistentDispatcherMultipleConsumers dispat
this.numberDelayedMessages = recoverBucketSnapshot();
}

private long recoverBucketSnapshot() throws RuntimeException {
private synchronized long recoverBucketSnapshot() throws RuntimeException {
ManagedCursor cursor = this.lastMutableBucket.cursor;
cursor.getCursorProperties().keySet().forEach(key -> {
if (key.startsWith(DELAYED_BUCKET_KEY_PREFIX)) {
Expand Down

0 comments on commit a7628e8

Please sign in to comment.