-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][flaky-test]ConsumedLedgersTrimTest #17116
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 1 commit into
apache:master
from
poorbarcode:flaky/ConsumedLedgersTrimTest
Aug 18, 2022
Merged
[fix][flaky-test]ConsumedLedgersTrimTest #17116
codelipenghui
merged 1 commit into
apache:master
from
poorbarcode:flaky/ConsumedLedgersTrimTest
Aug 18, 2022
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
Contributor
Author
|
/pulsarbot rerun-failure-checks |
This was
linked to
issues
Aug 17, 2022
Contributor
Author
|
/pulsarbot rerun-failure-checks |
codelipenghui
approved these changes
Aug 17, 2022
Technoboy-
approved these changes
Aug 17, 2022
Contributor
Author
|
/pulsarbot rerun-failure-checks |
nodece
approved these changes
Aug 17, 2022
Contributor
Author
|
/pulsarbot rerun-failure-checks |
2 similar comments
Contributor
Author
|
/pulsarbot rerun-failure-checks |
Contributor
Author
|
/pulsarbot rerun-failure-checks |
a7514a2 to
8f3f1b5
Compare
Technoboy-
pushed a commit
that referenced
this pull request
Aug 19, 2022
Jason918
pushed a commit
that referenced
this pull request
Sep 4, 2022
(cherry picked from commit f6fd6b7)
congbobo184
pushed a commit
that referenced
this pull request
Nov 8, 2022
(cherry picked from commit f6fd6b7)
congbobo184
pushed a commit
that referenced
this pull request
Nov 30, 2022
(cherry picked from commit f6fd6b7)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-2.9
Archived: 2.9 is end of life
cherry-picked/branch-2.10
cherry-picked/branch-2.11
doc-not-needed
Your PR changes do not impact docs
release/2.9.4
release/2.10.2
type/flaky-tests
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.
Fixes
Master Issue: #11145 #10380 #17044
Motivation
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
Lines 145 to 150 in 4d7b1ac
In addition to calling
internalTrimLedgersdirectly in this unit test, the Broker also has scheduled tasksconsumedLedgersMonitorcallinginternalTrimLedgers.(High light)See the code above, If
consumedLedgersMonitorcallinternalTrimLedgersbeforeline:148:the command
topics.getLastMessageIdwill return-1:-1:-1, then the #11145 #10380 occurs.pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
Lines 152 to 161 in 4d7b1ac
(High light)See the code above, If
consumedLedgersMonitorcallinternalTrimLedgersbeforeline:161:the command
managedLedger.getLedgersInfoAsList().size()will return1, then the #17044 occurs.Modifications
internalTrimLedgersnever trigger byconsumedLedgersMonitorbeforeconsumedLedgersMonitoris triggered manually: disabled policy retention.pulsar/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/ConsumedLedgersTrimTest.java
Lines 94 to 99 in 4d7b1ac
line:99may be flaky, because we can't guarantee thatconsumedLedgersMonitor --> internalTrimLedgerswill be executed later thanline:99, so deleteline:99Documentation
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)