Skip to content

[improve][broker] Avoid go through all the consumers to get the message ack owner - #16245

Merged
hangc0276 merged 1 commit into
apache:masterfrom
codelipenghui:penghui/optimize_message_ack
Jun 28, 2022
Merged

[improve][broker] Avoid go through all the consumers to get the message ack owner#16245
hangc0276 merged 1 commit into
apache:masterfrom
codelipenghui:penghui/optimize_message_ack

Conversation

@codelipenghui

Copy link
Copy Markdown
Contributor

Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.

image

Without this PR:
perf_broker_subscribe_1.html.txt

With this PR:
perf_broker_subscribe_2.html.txt

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API: (no)
  • The schema: (no)
  • The default values of configurations: (no)
  • The wire protocol: (no)
  • The rest endpoints: (no)
  • The admin cli options: (no)
  • Anything that affects deployment: (no)

Documentation

Check the box below or label this PR directly.

Need to update docs?

  • doc-required
    (Your PR needs to update docs and you will update later)

  • doc-not-needed
    (Please explain why)

  • doc
    (Your PR contains doc changes)

  • doc-complete
    (Docs have been already added)

…ge ack owner

### Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.
@codelipenghui codelipenghui self-assigned this Jun 27, 2022
@codelipenghui codelipenghui added this to the 2.11.0 milestone Jun 27, 2022
@codelipenghui codelipenghui added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages area/broker release/2.10.2 release/2.9.4 labels Jun 27, 2022
@github-actions

Copy link
Copy Markdown

@codelipenghui Please provide a correct documentation label for your PR.
Instructions see Pulsar Documentation Label Guide.

@merlimat merlimat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hangc0276 hangc0276 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@hangc0276 hangc0276 added doc-not-needed Your PR changes do not impact docs and removed doc-label-missing labels Jun 28, 2022
@hangc0276
hangc0276 merged commit 68484f9 into apache:master Jun 28, 2022
@codelipenghui
codelipenghui deleted the penghui/optimize_message_ack branch June 28, 2022 01:45
codelipenghui added a commit that referenced this pull request Jun 28, 2022
…ge ack owner (#16245)

### Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.

(cherry picked from commit 68484f9)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jul 4, 2022
…ge ack owner (apache#16245)

### Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.

(cherry picked from commit 68484f9)
(cherry picked from commit b75af17)
congbobo184 pushed a commit that referenced this pull request Nov 8, 2022
…ge ack owner (#16245)

### Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.

(cherry picked from commit 68484f9)
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Nov 8, 2022
congbobo184 pushed a commit that referenced this pull request Nov 26, 2022
…ge ack owner (#16245)

### Motivation

The broker don't need to go through all the consumers to get the ack owner consumer.
Instead, it should check the current consumer first. If the pending acks of current consumer
don't have the ack position, go through all the consumers to find the owner consumer.

(cherry picked from commit 68484f9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/broker cherry-picked/branch-2.9 Archived: 2.9 is end of life cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.9.4 release/2.10.2 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants