Fix #199: Do not stop to replicate when producer throws exception - #220
Merged
Conversation
saandrews
reviewed
Feb 17, 2017
Contributor
There was a problem hiding this comment.
Can we setup the test this way? If you want, you can create another test.
- limit quota to 1 message
- Publish 10 messages
- verify receive times out after first message is received(since quota is full)
- Increase quota to 10
- Verify we receive the remaining 9 messages.
Contributor
Author
There was a problem hiding this comment.
@saandrews
I modified the test a little:
- limit quota to 1
- Publish 1 message and wait for reflecting backlog limitation ※
- Publish 9 messages and verify they will be pended
※ If I produce 10 messages at once in interval of reflecting backlog limitation, they will be sended
Contributor
There was a problem hiding this comment.
@merlimat Do you see any side effect if we rewind it for every exception. All failed pending messages would reach here and invoke rewind.
Contributor
There was a problem hiding this comment.
Rewind is a cheap operation, it just resets the readPosition to markDeletePosition + 1
rdhabalia
pushed a commit
that referenced
this pull request
Feb 24, 2017
* Fix #199: Do not stop to replicate when producer throws exception * Fix log messages * testReplicatorProducerClosing shoud be executed at last since it closes pulsar2/pulsar3 * Add unit test for replication resumption on backlog exceeded
hrsakai
pushed a commit
to hrsakai/pulsar
that referenced
this pull request
Dec 10, 2020
* Fixed Lookup service.
hangc0276
pushed a commit
to hangc0276/pulsar
that referenced
this pull request
May 26, 2021
hangc0276
pushed a commit
to hangc0276/pulsar
that referenced
this pull request
May 26, 2021
fixes apache#220 if using `computeIfAbsent `, `consumerManagerFuture.complete(null)` will store in `consumerTopicManagers`, and `getTopicConsumerManager ` will always get future null cache for key which should getTopic again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This closes #199
Modifications
When the replication producer catches an exception,
rewind cursor and continue readMoreEntries (if possible) rather than return immediately.
An unit test for simulating #199 is also added.
Result
Replicator will continue to replicate even when producer exception.