[ 
http://issues.apache.org/jira/browse/DERBY-2107?page=comments#action_12456770 ] 
            
Knut Anders Hatlen commented on DERBY-2107:
-------------------------------------------

> The first may have been an existing issue:
> 1) The field nestedLatch is used under synchronization when gettting
> the latch, but not when releasing the latch.

Thanks, I will move that into the synchronized block.

> 2) In setExclusive() if an attempt is made to double latch the page
> it will suceed, even when the transaction is not in abort. This
> seems to conflict the comments in the method. This will not be
> handled correctly on the unlatch as the first unlatch will
> completely clear the latch leaving the caller thinking it has the
> latch when it doesn't.  Not sure what the old code did in this
> situation.

Not sure I understand this comment. If one tries to double latch a
page, and the transaction is not in abort, it will wait until the page
is unlatched, just as any other transaction. This is the same as the
old code did, except that the old code would probably detect the
deadlock after derby.locks.deadlockTimeout seconds. Am I missing
something?

> On more, I think there has to be synchronization in isLatched()
> based upon previous discussions on the list about Java's memory
> model.

Yes, I believe that's true. Will fix that too.

> Move page latching out of the lock manager
> ------------------------------------------
>
>                 Key: DERBY-2107
>                 URL: http://issues.apache.org/jira/browse/DERBY-2107
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store, Services, Performance
>    Affects Versions: 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: derby-2107-1a.diff, derby-2107-1a.stat
>
>
> Latching of pages could be done more efficiently locally in store than in the 
> lock manager. See the discussion here: 
> http://thread.gmane.org/gmane.comp.apache.db.derby.devel/33135

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to