Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix][broker] Check the markDeletePosition and calculate the backlog #22947

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

nodece
Copy link
Member

@nodece nodece commented Jun 20, 2024

Motivation

#21248 improves the backlog calculation.

When isPrecise is false, sometimes it will fall back to the precise backlog count, if the mark delete position is greater than the last position, this will throw the invalid range:

2024-06-20T07:49:44,282+0800 [pulsar-stats-updater-32-1] ERROR org.apache.pulsar.broker.service.persis
tent.PersistentTopic
- Got exception when creating consumer stats for subscription xxxxx: Invalid range: (1563151:-1..1561964:1067]

Modifications

  • Add the mark delete position and last position checks, and then calculate the backlog

Verifying this change

This PR encapsulates the code without changing its original behavior.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
@nodece nodece merged commit 82b8d98 into apache:master Jun 20, 2024
53 of 58 checks passed
lhotari pushed a commit that referenced this pull request Jun 20, 2024
…22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
lhotari pushed a commit that referenced this pull request Jun 20, 2024
…22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
lhotari pushed a commit that referenced this pull request Jun 20, 2024
…22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
nodece added a commit that referenced this pull request Jun 21, 2024
…22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
nodece added a commit that referenced this pull request Jun 21, 2024
…22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
@nodece nodece deleted the fix-calculate-backlog branch June 21, 2024 03:09
nodece added a commit to ascentstream/pulsar that referenced this pull request Jun 21, 2024
…pache#22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 24, 2024
…pache#22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
(cherry picked from commit c0e1bff)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jun 25, 2024
…pache#22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
(cherry picked from commit c0e1bff)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jul 1, 2024
…pache#22947)

Signed-off-by: Zixuan Liu <nodeces@gmail.com>
(cherry picked from commit 82b8d98)
(cherry picked from commit c0e1bff)
@lhotari lhotari added this to the 4.0.0 milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants