Skip to content

Fix : The frist position in managedLedger is ahead of the last #4853

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

Merged
merged 9 commits into from
Aug 2, 2019

Conversation

fxbing
Copy link
Contributor

@fxbing fxbing commented Jul 30, 2019

Fixes #4852

Bug:

After create an empty ledger by sub/unsub and trim ledgers, the first position in managedLedger is ahead of the last when create a consumer without reopen the managed ledger.

Reason:

Last position will be update when opening managedLedger.
Because when creating an empty Ledger without reopening managedLedger, the last position is not be updated. Since the ledger pointed of the last position has been deleted, the first position point to the new ledger.

Fix:

The first position should fall back to last position.

@jiazhai
Copy link
Member

jiazhai commented Jul 31, 2019

run cpp tests

1 similar comment
@fxbing
Copy link
Contributor Author

fxbing commented Jul 31, 2019

run cpp tests

@sijie sijie added this to the 2.4.1 milestone Aug 1, 2019
@sijie sijie merged commit 46bfb2c into apache:master Aug 2, 2019
jiazhai pushed a commit that referenced this pull request Aug 28, 2019
Fixes #4852

Bug:

After create an empty ledger by sub/unsub and trim ledgers, the first position in managedLedger is ahead of the last when create a consumer without reopen the managed ledger.

Reason:

Last position will be update when opening managedLedger.
Because when creating an empty Ledger without reopening managedLedger, the last position is not be updated. Since the ledger pointed of the last position has been deleted, the first position point to the new ledger.

Fix:

The first position should fall back to last position.
(cherry picked from commit 46bfb2c)
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.

The frist position in managedLedger is ahead of the last
3 participants