GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — [fix][client] Fix consumer discarding all messages after redelivering during a reconnection by congbobo184 · Pull Request #20032 · apache/pulsar Conversation
|
|
The pr had no activity for 30 days, mark with Stale label. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…r-epoch-consume-stuck-problem
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
closing and reopening to trigger CI |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…r-epoch-consume-stuck-problem
…redeliver-epoch # Conflicts: # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java # pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentDispatcherSingleActiveConsumer.java # pulsar-broker/src/test/java/org/apache/pulsar/client/impl/MessageRedeliveryTest.java # pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
… broker learns the new epoch A Failover/Exclusive consumer that calls redeliverUnacknowledgedMessages() while its subscribe is in flight bumped its epoch but skipped the command, and the broker also dropped a redeliver that arrived before the consumer was created. The broker then kept the subscribe's older epoch and the client discarded every message it dispatched. The client now sends the redeliver whenever it has a connection (the subscribe success resets the permits, so none are added while reconnecting), and the broker applies a redeliver that arrives while the consumer is being created once it is. Supersedes the trimmed-down original change by congbobo184.
|
@congbobo184 this race is still on master, so I've taken the PR over: merged master and kept just the client send |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Two comments on reconnect ordering and test coverage.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…onnecting The redeliver sent while the consumer is Connecting can still reach the broker before the subscribe: when the subscribe write is queued from the lookup thread and the redeliver is called on the connection's event loop, the redeliver is written first and the broker drops it. The consumer now keeps the epoch it subscribed with and, once the subscribe succeeds, sends the current epoch if a redeliver changed it, before any flow permits. That covers every ordering and works with any broker version, so the early send and the broker-side deferral are reverted.
There was an error while loading. Please reload this page.
… during a reconnection (#20032) Co-authored-by: congbobo184 <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 4fc01a6)
… during a reconnection (apache#20032) Co-authored-by: congbobo184 <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 4fc01a6)
… during a reconnection (apache#20032) Co-authored-by: congbobo184 <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Lari Hotari <[email protected]> Co-authored-by: Matteo Merli <[email protected]> (cherry picked from commit 4fc01a6)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.