Repository navigation
Thrift upgrade 2 - #6893
Thrift upgrade 2#6893
Conversation
| @@ -148,6 +165,11 @@ | |||
| this.httpAuthService = new HttpAuthService(cookieDomain, cookiePath, cookieMaxAge, isCookieSecure, AUTH_COOKIE); | |||
| } | |||
|
|
|||
| @Override | |||
| protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | |||
| doPost(req, resp); | |||
| @@ -269,7 +291,7 @@ | |||
| } | |||
| LOG.info("Cookie added for clientUserName " + clientUserName); | |||
| } | |||
| super.doPost(request, response); | |||
| processThriftRequest(request, response); | |||
| processor.process(inProtocolFactory.getProtocol(transport), outProtocolFactory.getProtocol(transport)); | ||
| out.flush(); | ||
| } catch (Exception e) { | ||
| throw new ServletException(e); |
| @Override | ||
| protected void doGet(HttpServletRequest req, HttpServletResponse resp) | ||
| throws ServletException, IOException { | ||
| doPost(req, resp); |
5bb509a to
1687b2b
Compare
| return ret; | ||
| } | ||
| return (req instanceof HttpUriRequest && ((HttpUriRequest)req).isAborted()); | ||
| return super.retryRequest(response, executionCount, context); |
There was a problem hiding this comment.
I think it would be better to avoid default response retries here. Retrying Thrift POSTs on 429/503 can execute queries or writes twice.
| import org.apache.hc.core5.http.config.Registry; | ||
| import org.apache.hc.core5.http.config.RegistryBuilder; | ||
| import org.apache.hc.core5.ssl.SSLContexts; | ||
| import org.apache.http.conn.socket.ConnectionSocketFactory; | ||
| import org.apache.thrift.transport.THttpClient; |
There was a problem hiding this comment.
nit: Can you remove unused imports in this file?
There was a problem hiding this comment.
Removing the unused import with the next commit.
…ttpServices (apache#5907)" This reverts commit 4bdd0f1. (cherry picked from commit 98e88cf) (cherry picked from commit d3a573b95e35d494ce9814729fb08a6988c95f5d)
(cherry picked from commit 270b6e0) (cherry picked from commit b79c98c70421ca426831043b628d15a64e810f4b)
(cherry picked from commit b2cf5224b82b8142784188f9b3cf700e5cbce78f) # Conflicts: # .github/workflows/build.yml (cherry picked from commit 0a854fb)
40e0429 to
3e91655
Compare
|
saihemanth-cloudera
left a comment
There was a problem hiding this comment.
LGTM +1. Will wait for extra set of eyes as this is a huge patch.
|
I don't have a good understanding of the retry in HiveConnection, but the rest(thrift changes) sounds good. |
@dengzhhu653 : Thrift upgraded httpclient from 4 to 5. It is a breaking change. |
Sounds like HiveConnection(SAML) is the only place where has the incompatible issue, other old clients can still speak with HS2/HMS, right? |
Yes. We are testing it actively on downstream. Didn't have a failure so far. |



Upgrade Apache Thrift 0.16.0 → 0.24.0 and, as a forced consequence, migrates the HTTP transport used by the JDBC driver, HiveServer2, and the Standalone Metastore from Apache HttpComponents 4.x (org.apache.http.) to 5.x (org.apache.hc.).
What changes were proposed in this pull request?
libthrift: 0.16.0 → 0.24.0
httpclient / httpcore (4.5.13 / 4.4.13) → httpclient5 / httpcore5 (5.6.2 / 5.4.3)
All Thrift-generated code (Java, C++, PHP, Python, Ruby) has been regenerated with the 0.23.0 compiler.
fb303.thrift has been vendored into the repository (upstream Apache Thrift no longer publishes libfb303).
Why are the changes needed?
CVE-2026-43869
Does this PR introduce any user-facing change?
No
How was this patch tested?
Existing tests. For significant code changes, new test cases added.