You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by gj...@apache.org on 2019/12/09 19:17:03 UTC

[phoenix] branch 4.x-HBase-1.4 updated: PHOENIX-5608 upgrading CATALOG table fails when setting phoenix.connection.autoCommit=true

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

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


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

commit 076d02557b1c05b0d9647bf4853a561073d2a434
Author: Toshihiro Suzuki <br...@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 <gj...@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)) {