[
https://issues.apache.org/jira/browse/DERBY-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469575
]
Suresh Thalamati commented on DERBY-2107:
-----------------------------------------
Hi Knut,
I reviewed the latest patch, it looks good to be committed. I have only
few minor questions/comments :
1) you may want to fix comments in void setExclusive(BaseContainerHandle
requester)
// because i) lock manager might assume latches are exclusive for
// performance, ii)
2)
+ owner = requester;
+ requester.addObserver(this);
It took me some time to understand how this works on an error cases
scenarios, basically what happens if a thread after acquiring a latch
errors out for some reason. My understanding is you are handling
this cases by by putting the pages on the container observer list
(requester.addObserver(this)). Please add some comments to why this page
is added to observer list.
3)
+
+ // just deadlock out if a transaction tries to double latch the
+ // page while not in abort
comment is good. But , you may want to add some assertion or throw
error here, if this case should not happen.
4)
- /** Debugging, print slot table information */
- protected String slotTableToString()
I don't know why you removed this method in this patch. May
be this method is not used or not required. Occasionally I found
these type of methods useful while debugging a page corruption
to quickly dump page info with some minor changes to the code.
5)
+ // Expect notify from releaseExclusive().
+ wait();
I was wondering , if the wait() method here should be time based to catch
any infinite waits due to incorrectly missing release latch calls or you think
it is going to be be unnecessarily expensive ?
5) Did you find the existing unit tests already tests latching methods ? or
you are planning to write one.
Thanks
-suresh
> Move page latching out of the lock manager
> ------------------------------------------
>
> Key: DERBY-2107
> URL: https://issues.apache.org/jira/browse/DERBY-2107
> Project: Derby
> Issue Type: Improvement
> Components: Performance, Services, Store
> 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,
> derby-2107-1b.diff, derby-2107-1c.diff, derby-2107-1c.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.
-
You can reply to this email to add a comment to the issue online.