hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7093) Couple Increments/Appends with Put/Delete(s)
Date Thu, 15 Nov 2012 05:40:12 GMT

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

Ted Yu commented on HBASE-7093:

In javadoc, describe what the method does:
+  boolean prepareAppend(Append append, long now, boolean advanceMemstoreRead) throws IOException
Also, add @return javadoc.
+    boolean advancedMemstoreRead = false;
+    if (advanceMemstoreRead) {
Why introducing a local variable which is spelled almost exactly the same as method parameter
Looking at the method's return value, it would be the same as that of the input parameter,
advanceMemstoreRead. Looks like you don't need advancedMemstoreRead.
+        advancedMemstoreWrite = region.prepareAppend((Append)m, now, !advancedMemstoreWrite);
Can you explain the role for advancedMemstoreWrite above (especially the assignment) ?
> Couple Increments/Appends with Put/Delete(s)
> --------------------------------------------
>                 Key: HBASE-7093
>                 URL: https://issues.apache.org/jira/browse/HBASE-7093
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.96.0
>            Reporter: Varun Sharma
>            Assignee: Varun Sharma
>         Attachments: 7093-v1.txt
> See related issue - https://issues.apache.org/jira/browse/HBASE-4583
> Currently, we cannot bundle increment/append with put/delete operations. The above JIRA
MVCC'izes the increment/append operations.
> One issue is that increment(s)/append(s) are not idempotent and hence repeating the transaction
has an associated issue of leading to incorrect value/append results. This could be solved
by passing additional tokens as part of the append(s).
> One possible high level approach could be:
> 1) Class IncrementMutation which inherits from Increment and Mutation
> 2) In the mutateRow call, we add a case for "IncrementMutation" object
> 3) Factor out the code wrapped inside the "lock and MVCC" from increment() function to
> 4) Call internalIncrement from mutateRow and increment()

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message