nrg4878 commented on a change in pull request #2601:
URL: https://github.com/apache/hive/pull/2601#discussion_r724418606
##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -1067,33 +1069,58 @@ private void openSession() throws SQLException {
//TODO This is a bit hacky. We piggy back on a dummy OpenSession call
// to get the redirect response from the server. Instead its probably
cleaner to
// explicitly do a HTTP post request and get the response.
- int numRetry = isBrowserAuthMode() ? 2 : 1;
- for (int i=0; i<numRetry; i++) {
- try {
- openSession(openReq);
- } catch (TException e) {
- if (isSamlRedirect(e)) {
- boolean success = doBrowserSSO();
- if (!success) {
- String msg = browserClient.getServerResponse() == null
- || browserClient.getServerResponse().getMsg() == null ? ""
- : browserClient.getServerResponse().getMsg();
+ try {
+ int numRetry = 1;
+ if (isBrowserAuthMode()) {
+ numRetry = 2;
Review comment:
do we need a retry for a failed SAML auth workflow?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]