https://defect.opensolaris.org/bz/show_bug.cgi?id=19116

           Summary: SQLIntegrityConstraintViolationException when indexing
                    Bazaar history
    Classification: Development
           Product: opengrok
           Version: unspecified
          Platform: ANY/Generic
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: scm
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


I checked out a copy of MySQL Server from Launchpad (bzr branch
lp:mysql-server) and ran the indexer with the JDBC history cache enabled. The
indexing failed with this exception:

org.opensolaris.opengrok.history.HistoryException:
java.sql.SQLIntegrityConstraintViolationException: 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 'CHANGESETS_REPO_REV_UNIQUE' defined
on 'CHANGESETS'.
    at
org.opensolaris.opengrok.history.JDBCHistoryCache.store(JDBCHistoryCache.java:603)
    at
org.opensolaris.opengrok.history.Repository.createCache(Repository.java:233)
    at
org.opensolaris.opengrok.history.HistoryGuru.createCache(HistoryGuru.java:450)
    at
org.opensolaris.opengrok.history.HistoryGuru.ensureHistoryCacheExists(HistoryGuru.java:603)
    at
org.opensolaris.opengrok.index.IndexDatabase.update(IndexDatabase.java:337)
    at
org.opensolaris.opengrok.index.IndexDatabase$1.run(IndexDatabase.java:158)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.SQLIntegrityConstraintViolationException: 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
'CHANGESETS_REPO_REV_UNIQUE' defined on 'CHANGESETS'.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.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.executeUpdate(Unknown
Source)
    at
org.opensolaris.opengrok.history.JDBCHistoryCache.storeHistory(JDBCHistoryCache.java:698)
    at
org.opensolaris.opengrok.history.JDBCHistoryCache.store(JDBCHistoryCache.java:598)
    ... 11 more
Caused by: java.sql.SQLException: 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 'CHANGESETS_REPO_REV_UNIQUE' defined on
'CHANGESETS'.
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown
Source)
    at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
Source)
    ... 22 more
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 'CHANGESETS_REPO_REV_UNIQUE' defined on 'CHANGESETS'.
    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)
    ... 16 more

-- 
Configure bugmail: https://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to