Skip to content
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 server calls #6511

Merged

Commits on Jan 29, 2024

  1. HADOOP-18883. [ABFS]: Expect-100 JDK bug resolution: prevent multiple…

    … 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
    saxenapranav committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    56109e0 View commit details
    Browse the repository at this point in the history