[
https://issues.apache.org/jira/browse/DERBY-5406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Knut Anders Hatlen updated DERBY-5406:
--------------------------------------
Attachment: d5406-4a-push-retry-logic.diff
The attached d5406-4a-push-retry-logic.diff patch attempts to fix stack trace
(1) by pushing the retry logic further down into GenericStatement.prepare().
That method is used both when the compilation request comes from
prepareStatement() and when it comes from the execution.
I don't see stack trace (1) when I run the CompressAndPrepare repro. I saw a
couple occurrences of DERBY-5358, but no other errors.
All the regression tests passed with the patch.
More disappointing, I saw an error appear a couple of times when I ran the
D4275 repro. However, I also saw this error without the patch, so it looks like
an existing hole, and not something caused by this patch. No idea why I didn't
see it when I tested the 3a patch in the same environment. Here's the stack
trace I saw:
Caused by: ERROR XSAI2: The conglomerate (20 848) requested does not exist.
at
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:278)
at
org.apache.derby.impl.store.access.heap.HeapConglomerateFactory.readConglomerate(HeapConglomerateFactory.java:254)
at
org.apache.derby.impl.store.access.RAMAccessManager.conglomCacheFind(RAMAccessManager.java:482)
at
org.apache.derby.impl.store.access.RAMTransaction.findExistingConglomerate(RAMTransaction.java:394)
at
org.apache.derby.impl.store.access.RAMTransaction.getStaticCompiledConglomInfo(RAMTransaction.java:665)
at
org.apache.derby.impl.sql.compile.BaseJoinStrategy.fillInScanArgs1(BaseJoinStrategy.java:100)
at
org.apache.derby.impl.sql.compile.NestedLoopJoinStrategy.getScanArgs(NestedLoopJoinStrategy.java:252)
at
org.apache.derby.impl.sql.compile.FromBaseTable.getScanArguments(FromBaseTable.java:3510)
at
org.apache.derby.impl.sql.compile.FromBaseTable.generateResultSet(FromBaseTable.java:3200)
at
org.apache.derby.impl.sql.compile.FromBaseTable.generate(FromBaseTable.java:3127)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1382)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1334)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generateMinion(ProjectRestrictNode.java:1382)
at
org.apache.derby.impl.sql.compile.ProjectRestrictNode.generate(ProjectRestrictNode.java:1334)
at
org.apache.derby.impl.sql.compile.ScrollInsensitiveResultSetNode.generate(ScrollInsensitiveResultSetNode.java:109)
at
org.apache.derby.impl.sql.compile.CursorNode.generate(CursorNode.java:637)
at
org.apache.derby.impl.sql.compile.StatementNode.generate(StatementNode.java:345)
at
org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:517)
at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:97)
at
org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:85)
at
org.apache.derby.impl.sql.GenericPreparedStatement.rePrepare(GenericPreparedStatement.java:231)
at
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:411)
at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:319)
at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1242)
... 4 more
> Intermittent failures in CompressTableTest and TruncateTableTest
> ----------------------------------------------------------------
>
> Key: DERBY-5406
> URL: https://issues.apache.org/jira/browse/DERBY-5406
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.8.2.2, 10.9.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Attachments: CompressAndPrepare.java,
> d5406-1a-detect-invalidation-during-compilation.diff, d5406-1b.diff,
> d5406-2a-invalidate-self.diff, d5406-3a.diff, d5406-4a-push-retry-logic.diff
>
>
> The test cases CompressTableTest.testConcurrentInvalidation() and
> TruncateTableTest.testConcurrentInvalidation() fail intermittently with
> errors such as:
> ERROR XSAI2: The conglomerate (2,720) requested does not exist.
> The problem has been analyzed in the comments on DERBY-4275, and a patch
> attached to that issue (invalidation-during-compilation.diff) fixes the
> underlying race condition. However, that patch only works correctly together
> with the fix for DERBY-5161, which was backed out because it caused the
> regression DERBY-5280.
> We will therefore need to find a way to fix DERBY-5161 without reintroducing
> DERBY-5280 in order to resolve this issue.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira