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
HADOOP-18883. [ABFS]: Expect-100 JDK bug resolution: prevent multiple… #6484
HADOOP-18883. [ABFS]: Expect-100 JDK bug resolution: prevent multiple… #6484
Conversation
… server calls (apache#6022) Address JDK bug JDK-8314978 related to handling of HTTP 100 responses. https://bugs.openjdk.org/browse/JDK-8314978 In the AbfsHttpOperation, after sendRequest() we call processResponse() method from AbfsRestOperation. Even if the conn.getOutputStream() fails due to expect-100 error, we consume the exception and let the code go ahead. This may call getHeaderField() / getHeaderFields() / getHeaderFieldLong() after getOutputStream() has failed. These invocation all lead to server calls. This commit aims to prevent this. If connection.getOutputStream() fails due to an Expect-100 error, the ABFS client does not invoke getHeaderField(), getHeaderFields(), getHeaderFieldLong() or getInputStream(). getResponseCode() is safe as on the failure it sets the responseCode variable in HttpUrlConnection object. Contributed by Pranav Saxena
💔 -1 overall
This message was automatically generated. |
:::: AGGREGATED TEST RESULT :::: HNS-OAuth[INFO] Results: HNS-SharedKey[INFO] Results: NonHNS-SharedKey[INFO] Results: AppendBlob-HNS-OAuth[INFO] Results: Time taken: 48 mins 45 secs.
|
@steveloughran , requesting you to kindly review the backport PR please. Thank you so much. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
build failures are networking and unrelated to change
|
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.
+1
Merged. @saxenapranav you need to do a PR and test for branch-3.4 now, so 3.4.1 will have the fix |
@steveloughran , thank you very much for the review and the merge. I have created a pr #6511 on branch-3.4 Thank you very much. |
Backport of 7dc166d
Trunk PR: #6022
Description:
Address JDK bug JDK-8314978 related to handling of HTTP 100 responses.
https://bugs.openjdk.org/browse/JDK-8314978
In the AbfsHttpOperation, after sendRequest() we call processResponse() method from AbfsRestOperation.
Even if the conn.getOutputStream() fails due to expect-100 error, we consume the exception and let the code go ahead. This may call getHeaderField() / getHeaderFields() / getHeaderFieldLong() after getOutputStream() has failed. These invocation all lead to server calls.
This commit aims to prevent this.
If connection.getOutputStream() fails due to an Expect-100 error, the ABFS client does not invoke getHeaderField(), getHeaderFields(), getHeaderFieldLong() or getInputStream().
getResponseCode() is safe as on the failure it sets the responseCode variable in HttpUrlConnection object.