HSQLDB gets primary key constraint on multiple job cleanup ----------------------------------------------------------
Key: CONNECTORS-249 URL: https://issues.apache.org/jira/browse/CONNECTORS-249 Project: ManifoldCF Issue Type: Bug Components: Framework core Affects Versions: ManifoldCF 0.3 Reporter: Karl Wright Fix For: ManifoldCF 0.3 Create two jobs which overlap. Crawl both of them. Then delete one, and then the other. You will get stack traces like this: ERROR 2011-09-02 07:38:26,485 (Delete startup thread) - Exception tossed: integr ity constraint violation: unique constraint or index violation; SYS_PK_10121 tab le: JOBQUEUE org.apache.manifoldcf.core.interfaces.ManifoldCFException: integrity constraint violation: unique constraint or index violation; SYS_PK_10121 table: JOBQUEUE at org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.reinterpretExce ption(DBInterfaceHSQLDB.java:587) at org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.performModifica tion(DBInterfaceHSQLDB.java:607) at org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.performUpdate(D BInterfaceHSQLDB.java:242) at org.apache.manifoldcf.core.database.BaseTable.performUpdate(BaseTable .java:88) at org.apache.manifoldcf.crawler.jobs.JobQueue.prepareDeleteScan(JobQueu e.java:461) at org.apache.manifoldcf.crawler.jobs.JobManager.prepareDeleteScan(JobMa nager.java:4951) at org.apache.manifoldcf.crawler.system.StartDeleteThread.run(StartDelet eThread.java:107) Caused by: java.sql.SQLException: integrity constraint violation: unique constra int or index violation; SYS_PK_10121 table: JOBQUEUE at org.hsqldb.jdbc.Util.sqlException(Util.java:255) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStateme nt.java:4659) at org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(JDBCPreparedState ment.java:311) at org.apache.manifoldcf.core.database.Database.execute(Database.java:60 6) at org.apache.manifoldcf.core.database.Database$ExecuteQueryThread.run(D atabase.java:421) Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique cons traint or index violation; SYS_PK_10121 table: JOBQUEUE at org.hsqldb.error.Error.error(Error.java:134) at org.hsqldb.Constraint.getException(Constraint.java:914) at org.hsqldb.index.IndexAVL.insert(IndexAVL.java:731) at org.hsqldb.persist.RowStoreAVL.indexRow(RowStoreAVL.java:171) at org.hsqldb.persist.RowStoreAVLDisk.indexRow(RowStoreAVLDisk.java:169) at org.hsqldb.TransactionManagerMVCC.addInsertAction(TransactionManagerM VCC.java:401) at org.hsqldb.Session.addInsertAction(Session.java:434) at org.hsqldb.Table.insertSingleRow(Table.java:2553) at org.hsqldb.StatementDML.update(StatementDML.java:1032) at org.hsqldb.StatementDML.executeUpdateStatement(StatementDML.java:541) at org.hsqldb.StatementDML.getResult(StatementDML.java:196) at org.hsqldb.StatementDMQL.execute(StatementDMQL.java:190) at org.hsqldb.Session.executeCompiledStatement(Session.java:1344) at org.hsqldb.Session.execute(Session.java:997) at org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStateme nt.java:4651) ... 3 more This only happens on HSQLDB, and is probably related to CONNECTORS-248 and CONNECTORS-246. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira