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] Fix config replicationStartAt does not work when set it to earliest #23719

Merged
merged 3 commits into from
Dec 13, 2024

Conversation

poorbarcode
Copy link
Contributor

Motivation

@FieldContext(
        category = CATEGORY_SERVER,
        dynamic = true,
        doc = "The position that replication task start at, it can be set to earliest or latest (default).")
private String replicationStartAt = "latest";

The value of the config named replicationStartAt are earliest or latest, but both implementation and test used MessageId.earliest.toString() that value is -1:-1:-1( so the test works as expected).

Therefore, setting replicationStartAt to earliest does not work.

Modifications

  • Fix the incorrect implementation and keep compatibility with the previous version.

Documentation

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

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added this to the 4.1.0 milestone Dec 12, 2024
@poorbarcode poorbarcode self-assigned this Dec 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 12, 2024
@poorbarcode poorbarcode added the type/bug The PR fixed a bug or issue reported a bug label Dec 12, 2024
Copy link
Contributor

@gaoran10 gaoran10 left a comment

Choose a reason for hiding this comment

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

LGTM

@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode poorbarcode requested a review from lhotari December 12, 2024 14:17
@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.40%. Comparing base (bbc6224) to head (e427dd8).
Report is 787 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23719      +/-   ##
============================================
+ Coverage     73.57%   74.40%   +0.82%     
- Complexity    32624    34472    +1848     
============================================
  Files          1877     1945      +68     
  Lines        139502   147482    +7980     
  Branches      15299    16278     +979     
============================================
+ Hits         102638   109732    +7094     
- Misses        28908    29282     +374     
- Partials       7956     8468     +512     
Flag Coverage Δ
inttests 27.26% <33.33%> (+2.68%) ⬆️
systests 24.35% <0.00%> (+0.02%) ⬆️
unittests 73.79% <100.00%> (+0.94%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...sar/broker/service/persistent/PersistentTopic.java 79.89% <100.00%> (+1.43%) ⬆️

... and 667 files with indirect coverage changes

@poorbarcode poorbarcode merged commit 39f4ccd into apache:master Dec 13, 2024
52 checks passed
poorbarcode added a commit that referenced this pull request Dec 13, 2024
…t to earliest (#23719)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 39f4ccd)
poorbarcode added a commit that referenced this pull request Dec 13, 2024
…t to earliest (#23719)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 39f4ccd)
poorbarcode added a commit that referenced this pull request Dec 13, 2024
…t to earliest (#23719)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 39f4ccd)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 19, 2024
…t to earliest (apache#23719)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 39f4ccd)
(cherry picked from commit ab69c3d)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Dec 23, 2024
…t to earliest (apache#23719)

Co-authored-by: Lari Hotari <[email protected]>
(cherry picked from commit 39f4ccd)
(cherry picked from commit ab69c3d)
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.

6 participants