[ 
https://issues.apache.org/jira/browse/DERBY-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927335#action_12927335
 ] 

Knut Anders Hatlen commented on DERBY-4849:
-------------------------------------------

As to the NO_WAIT+retry option, if I've understood correctly, I don't think 
that alone would solve the deadlock issue. The transaction will still hold the 
locks that it has already acquired, and the other thread(s) involved in the 
deadlock will still be blocked, so the retry will just run into the same 
deadlock again. It may work if the transaction releases the locks before 
retrying, but I think syscs_update_statistics does all its work in the user 
transaction, and we need to use nested transactions if we want to release 
exclusive locks in the middle of a user transaction. We'd also need to decide 
how many times we should retry before giving up, and perhaps also how long to 
wait between each retry.

> Re-compilation may cause duplicate entries in the XPLAIN table
> --------------------------------------------------------------
>
>                 Key: DERBY-4849
>                 URL: https://issues.apache.org/jira/browse/DERBY-4849
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.2.1, 10.7.1.0
>            Reporter: Kristian Waagan
>            Assignee: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-4849-1a-narrow_fix.diff, 
> derby-4849-2a-broad_fix.diff, derby-4849-2b-broad_fix_with_test.diff, 
> derby-4849-2b-broad_fix_with_test.stat, 
> derby-4849-2c-broad_fix_with_test.diff, 
> derby-4849-xplain_duplicate_stacktrace.txt
>
>
> If happening at the right moment, a re-compilation request may cause 
> duplicate entries in the XPLAIN statement tables.
> I have only confirmed this for the SYSXPLAIN_STATEMENTS table, and I do not 
> know if the other XPLAIN tables are affected.
> The error is highly intermittent, and so far I have only been able to trigger 
> it when testing the automatic index statistics update prototype.
> See the attached stack-trace for some more details.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to