-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix the closed ledger did not delete after expired #9136
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
codelipenghui
merged 2 commits into
apache:master
from
wangjialing218:branch-refine-retention
Jan 10, 2021
Merged
fix the closed ledger did not delete after expired #9136
codelipenghui
merged 2 commits into
apache:master
from
wangjialing218:branch-refine-retention
Jan 10, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sijie
approved these changes
Jan 6, 2021
Contributor
Author
|
/pulsarbot run-failure-checks |
55f31df to
15e0c84
Compare
Contributor
Author
|
/pulsarbot run-failure-checks |
2 similar comments
Contributor
Author
|
/pulsarbot run-failure-checks |
Contributor
Author
|
/pulsarbot run-failure-checks |
update read position when mark delete position point to last entry update read position when mark delete position point to last entry fix the test case for rollover current ledger
1116ae1 to
103a5da
Compare
Contributor
Author
|
/pulsarbot run-failure-checks |
codelipenghui
approved these changes
Jan 9, 2021
codelipenghui
pushed a commit
that referenced
this pull request
Jan 14, 2021
Fixes #9057 When current ledger closed, if there is no incoming traffic, the read position of the cursor is still point to the last entry of the closed ledger, that casue the `slowestReaderLedgerId` point to the closed ledger in `internalTrimConsumedLedgers()` and fail to delete the closed ledger. When close current ledger, if cursor's mark delete position point to the last entry of current ledger, move the read position to the new created ledger. add test case: testDeletionAfterLedgerClosedAndRetention() (cherry picked from commit 0e5c536)
freeznet
pushed a commit
to streamnative/pulsar-archived
that referenced
this pull request
Jan 14, 2021
Fixes apache#9057 When current ledger closed, if there is no incoming traffic, the read position of the cursor is still point to the last entry of the closed ledger, that casue the `slowestReaderLedgerId` point to the closed ledger in `internalTrimConsumedLedgers()` and fail to delete the closed ledger. When close current ledger, if cursor's mark delete position point to the last entry of current ledger, move the read position to the new created ledger. add test case: testDeletionAfterLedgerClosedAndRetention() (cherry picked from commit 0e5c536)
codelipenghui
pushed a commit
that referenced
this pull request
Jan 28, 2021
Fixes #9057 When current ledger closed, if there is no incoming traffic, the read position of the cursor is still point to the last entry of the closed ledger, that casue the `slowestReaderLedgerId` point to the closed ledger in `internalTrimConsumedLedgers()` and fail to delete the closed ledger. When close current ledger, if cursor's mark delete position point to the last entry of current ledger, move the read position to the new created ledger. add test case: testDeletionAfterLedgerClosedAndRetention() (cherry picked from commit 0e5c536)
This was referenced Mar 30, 2021
merlimat
pushed a commit
to merlimat/pulsar
that referenced
this pull request
Apr 6, 2021
### Motivation Fixes apache#9057 When current ledger closed, if there is no incoming traffic, the read position of the cursor is still point to the last entry of the closed ledger, that casue the `slowestReaderLedgerId` point to the closed ledger in `internalTrimConsumedLedgers()` and fail to delete the closed ledger. ### Modifications When close current ledger, if cursor's mark delete position point to the last entry of current ledger, move the read position to the new created ledger. ### Verifying this change add test case: testDeletionAfterLedgerClosedAndRetention()
codelipenghui
pushed a commit
that referenced
this pull request
May 23, 2021
…0087) This pull request resolves #10086 ## Motivation Although #7111 and #9136 solved the problems of 1. current ledger is full and cannot be rolled 2. cursor has subscribed to an expired ledger, which makes the cleaning thread unable to clean up respectively. However, when we close and open a managed-ledger(such like brokers shutdown unexpectedly or topics unload due to rebalance), the managed-ledger will create an empty ledger after initialization causing the current cleanup logic failed to take effect. Therefore I think we need a more unified entrance to solve the cursor update problem, and then further solve the problem of clearing expired ledgers. ## Expected Behavior 1. Able to cleanup expired data after managed-ledger re-open 2. A more unified entrance to implement cursor update ## Modification 1. move the cursor update logic to `internalTrimConsumedLedgers` from `ManagedLedgerImpl`'s callback `createComplete` 2. update `lastConfirmedEntry` if necessary when updating cursors
yangl
pushed a commit
to yangl/pulsar
that referenced
this pull request
Jun 23, 2021
…ache#10087) This pull request resolves apache#10086 ## Motivation Although apache#7111 and apache#9136 solved the problems of 1. current ledger is full and cannot be rolled 2. cursor has subscribed to an expired ledger, which makes the cleaning thread unable to clean up respectively. However, when we close and open a managed-ledger(such like brokers shutdown unexpectedly or topics unload due to rebalance), the managed-ledger will create an empty ledger after initialization causing the current cleanup logic failed to take effect. Therefore I think we need a more unified entrance to solve the cursor update problem, and then further solve the problem of clearing expired ledgers. ## Expected Behavior 1. Able to cleanup expired data after managed-ledger re-open 2. A more unified entrance to implement cursor update ## Modification 1. move the cursor update logic to `internalTrimConsumedLedgers` from `ManagedLedgerImpl`'s callback `createComplete` 2. update `lastConfirmedEntry` if necessary when updating cursors
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this pull request
Mar 18, 2022
…ache#10087) This pull request resolves apache#10086 ## Motivation Although apache#7111 and apache#9136 solved the problems of 1. current ledger is full and cannot be rolled 2. cursor has subscribed to an expired ledger, which makes the cleaning thread unable to clean up respectively. However, when we close and open a managed-ledger(such like brokers shutdown unexpectedly or topics unload due to rebalance), the managed-ledger will create an empty ledger after initialization causing the current cleanup logic failed to take effect. Therefore I think we need a more unified entrance to solve the cursor update problem, and then further solve the problem of clearing expired ledgers. ## Expected Behavior 1. Able to cleanup expired data after managed-ledger re-open 2. A more unified entrance to implement cursor update ## Modification 1. move the cursor update logic to `internalTrimConsumedLedgers` from `ManagedLedgerImpl`'s callback `createComplete` 2. update `lastConfirmedEntry` if necessary when updating cursors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Fixes #9057
When current ledger closed, if there is no incoming traffic, the read position of the cursor is still point to the last entry of the closed ledger, that casue the
slowestReaderLedgerIdpoint to the closed ledger ininternalTrimConsumedLedgers()and fail to delete the closed ledger.Modifications
When close current ledger, if cursor's mark delete position point to the last entry of current ledger, move the read position to the new created ledger.
Verifying this change
add test case: testDeletionAfterLedgerClosedAndRetention()