phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamestay...@apache.org
Subject git commit: PHOENIX-901 Ensure ConnectionQueryServices only initialized once
Date Fri, 28 Mar 2014 07:41:25 GMT
Repository: incubator-phoenix
Updated Branches:
  refs/heads/4.0 346c77890 -> 683897ec3


PHOENIX-901 Ensure ConnectionQueryServices only initialized once


Project: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/commit/683897ec
Tree: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/tree/683897ec
Diff: http://git-wip-us.apache.org/repos/asf/incubator-phoenix/diff/683897ec

Branch: refs/heads/4.0
Commit: 683897ec309d1d385821630fbff94bf46f407f5b
Parents: 346c778
Author: James Taylor <jamestaylor@apache.org>
Authored: Fri Mar 28 00:23:22 2014 -0700
Committer: James Taylor <jamestaylor@apache.org>
Committed: Fri Mar 28 00:41:18 2014 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/phoenix/jdbc/PhoenixDriver.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/683897ec/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
index 823f04b..7834d0e 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixDriver.java
@@ -143,11 +143,12 @@ public final class PhoenixDriver extends PhoenixEmbeddedDriver {
                     } else {
                         sqlE.setNextException(e);
                     }
-                }
-                // Remove from map, as initialization failed
-                connectionQueryServicesMap.remove(connectionQueryServices);
-                if (sqlE != null) {
-                    throw sqlE;
+                } finally {
+                    // Remove from map, as initialization failed
+                    connectionQueryServicesMap.remove(normalizedConnInfo);
+                    if (sqlE != null) {
+                        throw sqlE;
+                    }
                 }
             }
         }


Mime
View raw message