[ https://issues.apache.org/jira/browse/PHOENIX-3254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15532515#comment-15532515 ]
Hadoop QA commented on PHOENIX-3254: ------------------------------------ {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12830285/PHOENIX-3254.patch against master branch at commit 15a2f9a625dc9a76fd07cae82e81d8ec1d79d622. ATTACHMENT ID: 12830285 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 6 new or modified tests. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:red}-1 javadoc{color}. The javadoc tool appears to have generated 38 warning messages. {color:red}-1 release audit{color}. The applied patch generated 1 release audit warnings (more than the master's current 0 warnings). {color:red}-1 lineLengths{color}. The patch introduces the following lines longer than 100: + verifySequenceValue(isNamespaceEnabled? "a" : null, sequenceNameA, sequenceSchemaName, -32767); + verifySequenceValue(isNamespaceEnabled? "b" : null, sequenceNameB, sequenceSchemaName, -32767); + conn1.createStatement().execute("CREATE INDEX " + indexName + "_2 ON " + viewName + " (v1)"); + String tenantIdStr = tenantIdBytes.length == 0 ? null : Bytes.toString(tenantIdBytes); + try (PhoenixConnection connection = DriverManager.getConnection(MetaDataUtil.getJdbcUrl(env), props).unwrap(PhoenixConnection.class)){ + int nSequenceSaltBuckets = connection.getQueryServices().getSequenceSaltBuckets(); + SequenceKey key = MetaDataUtil.getViewIndexSequenceKey(tenantIdStr, physicalName, + // TODO Review Earlier sequence was created at (SCN-1/LATEST_TIMESTAMP) and incremented at the client max(SCN,dataTable.getTimestamp), but it seems we should + // use always LATEST_TIMESTAMP to avoid seeing wrong sequence values by different connection having SCN + connection.getQueryServices().createSequence(key.getTenantId(), key.getSchemaName(), key.getSequenceName(), {color:red}-1 core tests{color}. The patch failed these unit tests: ./phoenix-core/target/failsafe-reports/TEST-org.apache.phoenix.tx.TransactionIT Test results: https://builds.apache.org/job/PreCommit-PHOENIX-Build/606//testReport/ Release audit warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/606//artifact/patchprocess/patchReleaseAuditWarnings.txt Javadoc warnings: https://builds.apache.org/job/PreCommit-PHOENIX-Build/606//artifact/patchprocess/patchJavadocWarnings.txt Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/606//console This message is automatically generated. > IndexId Sequence is incremented even if index exists already. > ------------------------------------------------------------- > > Key: PHOENIX-3254 > URL: https://issues.apache.org/jira/browse/PHOENIX-3254 > Project: Phoenix > Issue Type: Bug > Reporter: Ankit Singhal > Assignee: Ankit Singhal > Fix For: 4.9.0 > > Attachments: PHOENIX-3254.patch, PHOENIX-3254_wip.patch > > > As we are incrementing sequence at the client even if we are not going to > create a index (in case index already exists and user is using CREATE INDEX > IF NOT EXISTS) or DDL failed in later stage(due to parent table not found or > something). > If this keeps on happening then user may reach the limit of Short.MAX_VALUE > and TOO_MANY_INDEXES exception will be thrown if user tries to create a new > index. > To prevent, this we should increment sequences when we are about to create a > index at server. -- This message was sent by Atlassian JIRA (v6.3.4#6332)