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 (JamesTaylor)
Date Fri, 28 Mar 2014 02:32:35 GMT
Repository: incubator-phoenix
Updated Branches:
  refs/heads/3.0 efe25292f -> 10235e6db


PHOENIX-901 Ensure ConnectionQueryServices only initialized once (JamesTaylor)


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

Branch: refs/heads/3.0
Commit: 10235e6dbd08df59b3051f83890acdb2d33fbdfb
Parents: efe2529
Author: James Taylor <jamestaylor@apache.org>
Authored: Thu Mar 27 18:37:34 2014 -0700
Committer: James Taylor <jamestaylor@apache.org>
Committed: Thu Mar 27 18:37:34 2014 -0700

----------------------------------------------------------------------
 .../phoenix/query/ConnectionQueryServicesImpl.java    | 14 +++++++++-----
 .../query/ConnectionlessQueryServicesImpl.java        | 14 +++++++++-----
 2 files changed, 18 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/10235e6d/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index 74b629c..b4a1f1f 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -1339,7 +1339,6 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
             if (closed) {
                 throw new SQLException("The connection to the cluster has been closed.");
             }
-            initialized = true;
                 
             SQLException sqlE = null;
             PhoenixConnection metaConnection = null;
@@ -1373,10 +1372,15 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                     } else {
                         sqlE = e;
                     }
-                }
-                if (sqlE != null) {
-                    initializationException = sqlE;
-                    throw sqlE;
+                } finally {
+                    try {
+                        if (sqlE != null) {
+                            initializationException = sqlE;
+                            throw sqlE;
+                        }
+                    } finally {
+                        initialized = true;
+                    }
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-phoenix/blob/10235e6d/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
index ced4ba4..75cfe92 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionlessQueryServicesImpl.java
@@ -218,7 +218,6 @@ public class ConnectionlessQueryServicesImpl extends DelegateQueryServices
imple
                 }
                 return;
             }
-            initialized = true;
             SQLException sqlE = null;
             PhoenixConnection metaConnection = null;
             try {
@@ -249,10 +248,15 @@ public class ConnectionlessQueryServicesImpl extends DelegateQueryServices
imple
                     } else {
                         sqlE = e;
                     }
-                }
-                if (sqlE != null) {
-                    initializationException = sqlE;
-                    throw sqlE;
+                } finally {
+                    try {
+                        if (sqlE != null) {
+                            initializationException = sqlE;
+                            throw sqlE;
+                        }
+                    } finally {
+                        initialized = true;
+                    }
                 }
             }
         }


Mime
View raw message