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

gjacoby pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


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

commit d7d9efcc9ba9d269c61613753fee7e08dfc06752
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
---
 .../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 ad9d2fc..f3f368e 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
@@ -3931,6 +3931,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