[fix][broker] Fix creating producer failure when set backlog quota. - #15663
Merged
Conversation
codelipenghui
requested changes
May 20, 2022
Technoboy-
force-pushed
the
producer-exceed-quota-1
branch
2 times, most recently
from
May 23, 2022 09:09
5c6c4d9 to
73ccd91
Compare
codelipenghui
approved these changes
May 24, 2022
codelipenghui
left a comment
Contributor
There was a problem hiding this comment.
LGTM, left a minor comment.
Comment on lines
+2576
to
+2573
| org.apache.bookkeeper.mledger.proto.MLDataFormats.ManagedLedgerInfo.LedgerInfo | ||
| ledgerInfo = ledger.getLedgerInfo(ledgerId).get(); |
Contributor
There was a problem hiding this comment.
Here will be a risk to call .get() directly since the implementation of getLedgerInfo() might changed although this does not appear to be a problem at present.
Contributor
There was a problem hiding this comment.
Yes, I think we can use another PR to make it asynchronous.
BewareMyPower
requested changes
May 25, 2022
Technoboy-
force-pushed
the
producer-exceed-quota-1
branch
from
May 25, 2022 02:07
73ccd91 to
9ce00b3
Compare
Technoboy-
force-pushed
the
producer-exceed-quota-1
branch
from
May 25, 2022 02:10
9ce00b3 to
d93ae3c
Compare
BewareMyPower
requested changes
May 25, 2022
Contributor
Author
Contributor
Author
Contributor
Contributor
Author
codelipenghui
pushed a commit
that referenced
this pull request
May 26, 2022
…15663) When trying to reproduce the problem of #15609 using the master's code, it was found that the master also had this bug. The root cause is: When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer. The added test could reproduce this. So when there is only one ledger, we should not exclude it. If revert this patch, the added test will fail. (cherry picked from commit 3a80458)
codelipenghui
pushed a commit
that referenced
this pull request
May 26, 2022
…15663) When trying to reproduce the problem of #15609 using the master's code, it was found that the master also had this bug. The root cause is: When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer. The added test could reproduce this. So when there is only one ledger, we should not exclude it. If revert this patch, the added test will fail. (cherry picked from commit 3a80458)
codelipenghui
pushed a commit
that referenced
this pull request
May 26, 2022
…15663) When trying to reproduce the problem of #15609 using the master's code, it was found that the master also had this bug. The root cause is: When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer. The added test could reproduce this. So when there is only one ledger, we should not exclude it. If revert this patch, the added test will fail. (cherry picked from commit 3a80458)
nicoloboschi
added a commit
to nicoloboschi/pulsar
that referenced
this pull request
May 26, 2022
…quota. (apache#15663)" This reverts commit 90c4653.
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
May 26, 2022
…pache#15663) When trying to reproduce the problem of apache#15609 using the master's code, it was found that the master also had this bug. The root cause is: When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer. The added test could reproduce this. So when there is only one ledger, we should not exclude it. If revert this patch, the added test will fail. (cherry picked from commit 3a80458) (cherry picked from commit cc8895e)
nicoloboschi
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 7, 2022
…pache#15663) When trying to reproduce the problem of apache#15609 using the master's code, it was found that the master also had this bug. The root cause is: When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer. The added test could reproduce this. So when there is only one ledger, we should not exclude it. If revert this patch, the added test will fail. (cherry picked from commit 3a80458) (cherry picked from commit dc7d512)
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
When trying to reproduce the problem of #15609 using the master's code, it was found that the master also had this bug. The root cause is:
When there is only one ledger in the ManagedLedger, after the current ledger is closed, it has the timestamp and exceeds the time set by the backlog-qutoa, resulting in the failure to create the producer.
The added test could reproduce this.
So when there is only one ledger, we should not exclude it.
Verifying this change
If revert this patch, the added test will fail.
Documentation
no-need-doc(Please explain why)