[ 
https://issues.apache.org/jira/browse/HBASE-5541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13225762#comment-13225762
 ] 

stack commented on HBASE-5541:
------------------------------

Why we have another variable for saying if locked?  Can't we ask the locked 
object if locked?

{code}
       this.updatesLock.readLock().lock();
+      locked = true;
{code}

this.updatesLock.readLock().lock(); returns a lock.  Use that?  Set it to null 
when unlocked?  If non-null in finally, unlock it?

Hmm... you are trying to make it same as doMiniBatchPut... ok.  Ignore above.

Could this patch not make it so doMiniBatchPut and the update to this method 
shared code?  They seem pretty similar?

This was done in a finally block:

{code}
-        mvcc.completeMemstoreInsert(w);
{code}

Its ok that its no longer in a finally block?  Could we skip out during the 
sync w/o updating this?  I suppose thats ok... then these new edits won't be 
seen by a running scanner?  If exception up in cp calling postdelete, postput, 
we'll rollback edits from memstore but mvcc has been advanced and won't go 
backward?  I see you update mvcc if w != null... but maybe the update of mvcc 
should happen after call to cp both here and in the doMiniBatchPut?

Otherwise +1 on commit
                
> Avoid holding the rowlock during HLog sync in HRegion.mutateRowWithLocks
> ------------------------------------------------------------------------
>
>                 Key: HBASE-5541
>                 URL: https://issues.apache.org/jira/browse/HBASE-5541
>             Project: HBase
>          Issue Type: Sub-task
>          Components: client, regionserver
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>             Fix For: 0.94.0
>
>         Attachments: 5541-v2.txt, 5541.txt
>
>
> Currently mutateRowsWithLocks holds the row lock while the HLog is sync'ed.
> Similar to what we do in doMiniBatchPut, we should create the log entry with 
> the lock held, but only sync the HLog after the lock is released, along with 
> rollback logic in case the sync'ing fails.

--
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

        

Reply via email to