[ https://issues.apache.org/jira/browse/HIVE-23630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marton Bod updated HIVE-23630: ------------------------------ Attachment: HIVE-23630.1.patch Status: Patch Available (was: Open) > TestTxnHandler#allocateNextWriteIdRetriesAfterDetectingConflictingConcurrentInsert > is unstable > ---------------------------------------------------------------------------------------------- > > Key: HIVE-23630 > URL: https://issues.apache.org/jira/browse/HIVE-23630 > Project: Hive > Issue Type: Sub-task > Reporter: Zoltan Haindrich > Assignee: Marton Bod > Priority: Major > Attachments: HIVE-23630.1.patch > > > I think I've seen this exception but it seems to be coming from this testcase > more frequently > {code} > java.lang.RuntimeException: MetaException(message:Unable to update > transaction database > org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException: > The statement was aborted because it would have caused a duplicate key value > in a unique or primary key constraint or unique index identified by > 'NEXT_WRITE_ID_IDX' defined on 'NEXT_WRITE_ID'. > at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown > Source) > at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source) > at > org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown > Source) > at > org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source) > at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source) > at > org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown > Source) > at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source) > at > com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) > at > com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) > at > org.apache.hadoop.hive.metastore.txn.TxnHandler.allocateTableWriteIds(TxnHandler.java:2074) > at > org.apache.hadoop.hive.metastore.txn.TestTxnHandler.lambda$allocateNextWriteIdRetriesAfterDetectingConflictingConcurrentInsert$1(TestTxnHandler.java:1780) > at > java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604) > at > java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1596) > at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) > at > java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) > at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) > at > java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) > Caused by: ERROR 23505: The statement was aborted because it would have > caused a duplicate key value in a unique or primary key constraint or unique > index identified by 'NEXT_WRITE_ID_IDX' defined on 'NEXT_WRITE_ID'. > at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > at org.apache.derby.iapi.error.StandardException.newException(Unknown Source) > at org.apache.derby.impl.sql.execute.IndexChanger.insertAndCheckDups(Unknown > Source) > at org.apache.derby.impl.sql.execute.IndexChanger.doInsert(Unknown Source) > at org.apache.derby.impl.sql.execute.IndexChanger.insert(Unknown Source) > at org.apache.derby.impl.sql.execute.IndexSetChanger.insert(Unknown Source) > at org.apache.derby.impl.sql.execute.RowChangerImpl.insertRow(Unknown Source) > at > org.apache.derby.impl.sql.execute.InsertResultSet.normalInsertCore(Unknown > Source) > at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown > Source) > at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source) > ... 13 more > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)