This is an automated email from the ASF dual-hosted git repository.

gjacoby pushed a commit to branch 4.x-HBase-1.5
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/4.x-HBase-1.5 by this push:
     new bdfc23f  PHOENIX-5608 upgrading CATALOG table fails when setting 
phoenix.connection.autoCommit=true
bdfc23f is described below

commit bdfc23f5c302253c393ff344df56d3b5d0cd1599
Author: Toshihiro Suzuki <brfrn...@gmail.com>
AuthorDate: Mon Dec 9 00:52:55 2019 +0900

    PHOENIX-5608 upgrading CATALOG table fails when setting 
phoenix.connection.autoCommit=true
    
    Signed-off-by: Geoffrey Jacoby <gjac...@apache.org>
---
 .../main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java  | 1 +
 1 file changed, 1 insertion(+)

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 6a4ae41..b845156 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
@@ -3906,6 +3906,7 @@ public class ConnectionQueryServicesImpl extends 
DelegateQueryServices implement
         props.setProperty(PhoenixRuntime.CURRENT_SCN_ATTRIB, 
Long.toString(timestamp));
         // Cannot go through DriverManager or you end up in an infinite loop 
because it'll call init again
         PhoenixConnection metaConnection = new 
PhoenixConnection(oldMetaConnection, this, props);
+        metaConnection.setAutoCommit(false);
         PTable sysCatalogPTable = metaConnection.getTable(new PTableKey(null, 
PhoenixDatabaseMetaData.SYSTEM_CATALOG_NAME));
         int numColumns = sysCatalogPTable.getColumns().size();
         try (PreparedStatement mutateTable = 
metaConnection.prepareStatement(MetaDataClient.MUTATE_TABLE)) {

Reply via email to