[
https://issues.apache.org/jira/browse/DERBY-6419?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13833169#comment-13833169
]
Dag H. Wanvik commented on DERBY-6419:
--------------------------------------
Uploading an experimental patch which seems to do the job. Using the debugger I
can see that the current wait in ConstraintCharactericsTest#testLocking, line
417 as of svn 1545394 is no longer waiting with the patch, and stepping through
the code in IndexChanger I can see that the second next() which currently waits
returns immediately with an exception as desired.
Instead of overloading the current flag OPENMODE_LOCK_NOWAIT, I introduced a
new flag OPENMODE_LOCK_ROW_NOWAIT instead. The short circuiting logic was added
in B2IRowLocking3#LockRowOnPage: I had to added an accessor to HeapController
to get at the open_mode of the base table's conglomerate; not sure if that's
kosher or not. An alternative could be to keep to flag in the B2IForwardScan
object.
Running regressions.
> Make BTree scan honor OPENMODE_LOCK_NOWAIT for row locks.
> ----------------------------------------------------------
>
> Key: DERBY-6419
> URL: https://issues.apache.org/jira/browse/DERBY-6419
> Project: Derby
> Issue Type: Sub-task
> Components: Store
> Reporter: Dag H. Wanvik
>
> Optimization desirable to support deferred constraints.
--
This message was sent by Atlassian JIRA
(v6.1#6144)