Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DC03D11A18 for ; Fri, 2 May 2014 03:39:40 +0000 (UTC) Received: (qmail 67920 invoked by uid 500); 2 May 2014 03:39:40 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 67825 invoked by uid 500); 2 May 2014 03:39:38 -0000 Mailing-List: contact dev-help@phoenix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.incubator.apache.org Delivered-To: mailing list dev@phoenix.incubator.apache.org Received: (qmail 67808 invoked by uid 99); 2 May 2014 03:39:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 03:39:36 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 May 2014 03:39:35 +0000 Received: (qmail 67783 invoked by uid 99); 2 May 2014 03:39:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 03:39:15 +0000 Date: Fri, 2 May 2014 03:39:15 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-956) Connection properties ignored MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987287#comment-13987287 ] James Taylor commented on PHOENIX-956: -------------------------------------- +1 - thanks for the quick turnaround on this fix, [~samarth.jain@gmail.com], and thanks for reporting the issue, [~cristian_armaselu]. > Connection properties ignored > ----------------------------- > > Key: PHOENIX-956 > URL: https://issues.apache.org/jira/browse/PHOENIX-956 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.0.0 > Environment: Win 7 > Reporter: Cristian Armaselu > Assignee: Samarth Jain > Attachments: PHOENIX-956_v2.patch > > > Connection opened as: > Properties connectionProperties = new Properties(); > connectionProperties.setProperty(QueryServices.MAX_MUTATION_SIZE_ATTRIB,"10000000"); > connectionProperties.setProperty(QueryServices.IMMUTABLE_ROWS_ATTRIB,"10000000"); > connection = DriverManager.getConnection("jdbc:phoenix:ulvdtlchd01:2181",connectionProperties); > Executing: > preparedStatement = connection.prepareStatement("upsert into cristi_test(id,name,other) values(?,?,?)"); > for (int i = 0; i < 10000000; i++) { > preparedStatement.setString(1, "AAAA" + i); > preparedStatement.setString(2, "BBBB" + i); > preparedStatement.setString(3, "cccc" + i); > preparedStatement.execute(); > } > Getting: > java.lang.IllegalArgumentException: MutationState size of 500001 is bigger than max allowed size of 500000 > at org.apache.phoenix.execute.MutationState.throwIfTooBig(MutationState.java:114) > at org.apache.phoenix.execute.MutationState.join(MutationState.java:163) > at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:227) > at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:185) > at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:146) > at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:151) > Because: > In PhoenixConnection constructor : > this.info = info == null ? new Properties() : new Properties(info); > info passed to the constructor is size 3 > the above is not copying the properties so the below is executed > if (this.info.isEmpty() && tenantId == null) { > this.services = services; > since this.info.isEmpty() is true > That means the passed info connection properties are ignored and not wrapped in the DelegateConnectionQueryServices which follows the other branch of the if above -- This message was sent by Atlassian JIRA (v6.2#6252)