Repository navigation
[client] Optimize pause when creating sub consumers in multi-topic consumer - #14566
Conversation
|
/pulsarbot run-failure-checks |
2 similar comments
|
/pulsarbot run-failure-checks |
|
/pulsarbot run-failure-checks |
codelipenghui
left a comment
There was a problem hiding this comment.
LGTM, is it able to add a test?
|
@Jason918 if (!(firstTimeConnect && hasParentConsumer) && getCurrentReceiverQueueSize() != 0) {
increaseAvailablePermits(cnx, getCurrentReceiverQueueSize());
}
BTW, #11974 introduce Left a comment, PTAL. |
Great point. I have updated the motivation description. |
(cherry picked from commit a32edc7)
(cherry picked from commit a32edc7)
|
This seems to make the client behave in the wrong way for multi-topic consumer. Before this change, the client would first subscribe to all topics and then send flow permits to the broker in the startReceivingMessages method. |
|
I created #25005 as a bug |
|
It wasn't a bug after all, created a PR to cleanup the code instead, #25009 |
Remove the optional jcstress harness, dependencies and build tasks. Explain why pause-state reconciliation is necessary and how initial FLOW ordering is preserved, with references to apache#14566 and apache#25009. Assisted-by: Codex
Motivation
Currently, if we subscribe new partitions/topics when multiTopicConsumer is paused, the sub consumers will start in non-pause mode and then changed to pause.
Modifications
Set
startPauseconfig when creating sub consumers.Verifying this change
This change is already covered by existing tests, such as
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
no-need-docInternal optimization.