-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](mysql) Fix SSL unwrap infinite loop on handshake failure #57364
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
fe/fe-core/src/main/java/org/apache/doris/mysql/MysqlSslContext.java
Outdated
Show resolved
Hide resolved
|
run buildall |
TPC-DS: Total hot run time: 188085 ms |
ClickBench: Total hot run time: 28.28 s |
FE UT Coverage ReportIncrement line coverage |
FE Regression Coverage ReportIncrement line coverage |
|
run buildall |
FE Regression Coverage ReportIncrement line coverage |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
| result.limit(result.position() + packetLen); | ||
| readLen = readAll(result, false); | ||
| if (isSslMode && remainingBuffer.position() == 0 && result.hasRemaining()) { | ||
| if (isSslMode && !isSslHandshaking && remainingBuffer.position() == 0 && result.hasRemaining()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i noticed
public void setSslMode(boolean sslMode) {
isSslMode = sslMode;
if (isSslMode) {
// channel in ssl mode means handshake phase has finished.
isSslHandshaking = false;
}
}Is it necessary to add this check?
| if (sslEngine == null) { | ||
| return; | ||
| } | ||
| boolean previousHandshaking = isSslHandshaking; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same situation,before completeHandshake execute,the isSslMode == true
d21a7bd to
4ad1f7e
Compare
|
PR approved by at least one committer and no changes requested. |
|
run buildall |
TPC-DS: Total hot run time: 189911 ms |
ClickBench: Total hot run time: 27.84 s |
FE Regression Coverage ReportIncrement line coverage |
…on handshake failure apache#57364 (apache#5763) cherry-picks from apache#57364 Related to apache#5448 Co-authored-by: abmdocrt <lianyukang@selectdb.com>
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)