[ 
https://issues.apache.org/jira/browse/CONNECTORS-248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095067#comment-13095067
 ] 

Karl Wright commented on CONNECTORS-248:
----------------------------------------

The constraint being violated appears to be the primary key for the table, 
which is the "id" column.  This is very strange because the update operation in 
question is not changing the "id" column in any way, but rather another column. 
 The update uses the clause ... WHERE id IN (...)  to apply the update to 
multiple rows at a single time.  So I can't think of any reason this can 
possibly result in a unique constraint violation.

This is the second bizarre bug I've seen when crawling with HSQLDB.  I'm 
beginning to think that there's a funky sort of race condition in this 
database.  Either that, or we're seeing a misleading error message, which 
really means something else (maybe that two transactions are trying to write 
the same record or something).  I think I'm going to have to escalate this to 
the HSQLDB group.


> File system crawl with HSQLDB aborts with a constraint error
> ------------------------------------------------------------
>
>                 Key: CONNECTORS-248
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-248
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Framework agents process, Framework core
>    Affects Versions: ManifoldCF 0.3
>            Reporter: Karl Wright
>
> While running two jobs with overlapping files with HSQLDB, I got this error 
> on the second job that aborted it:
> Error: integrity constraint violation: unique constraint or index violation; 
> SYS_PK_10041 table: INGESTSTATUS
> The complete exception is here:
> ERROR 2011-08-31 21:07:06,029 (Worker thread '34') - Exception tossed: 
> integrity constraint violation: unique constraint or index violation; 
> SYS_PK_10041 table: INGESTSTATUS
> org.apache.manifoldcf.core.interfaces.ManifoldCFException: integrity 
> constraint violation: unique constraint or index violation; SYS_PK_10041 
> table: INGESTSTATUS
>       at 
> org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.reinterpretException(DBInterfaceHSQLDB.java:587)
>       at 
> org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.performModification(DBInterfaceHSQLDB.java:607)
>       at 
> org.apache.manifoldcf.core.database.DBInterfaceHSQLDB.performUpdate(DBInterfaceHSQLDB.java:242)
>       at 
> org.apache.manifoldcf.core.database.BaseTable.performUpdate(BaseTable.java:88)
>       at 
> org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.updateRowIds(IncrementalIngester.java:628)
>       at 
> org.apache.manifoldcf.agents.incrementalingest.IncrementalIngester.documentCheckMultiple(IncrementalIngester.java:588)
>       at 
> org.apache.manifoldcf.crawler.system.WorkerThread.run(WorkerThread.java:653)
> Caused by: java.sql.SQLException: integrity constraint violation: unique 
> constraint or index violation; SYS_PK_10041 table: INGESTSTATUS
>       at org.hsqldb.jdbc.Util.sqlException(Util.java:255)
>       at 
> org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4659)
>       at 
> org.hsqldb.jdbc.JDBCPreparedStatement.executeUpdate(JDBCPreparedStatement.java:311)
>       at 
> org.apache.manifoldcf.core.database.Database.execute(Database.java:606)
>       at 
> org.apache.manifoldcf.core.database.Database$ExecuteQueryThread.run(Database.java:421)
> Caused by: org.hsqldb.HsqlException: integrity constraint violation: unique 
> constraint or index violation; SYS_PK_10041 table: INGESTSTATUS
>       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(TransactionManagerMVCC.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:1340)
>       at org.hsqldb.Session.execute(Session.java:993)
>       at 
> org.hsqldb.jdbc.JDBCPreparedStatement.fetchResult(JDBCPreparedStatement.java:4651)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to