accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-3044) ConditionalMutation should support conditional updates
Date Tue, 05 Aug 2014 17:38:12 GMT

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

Keith Turner commented on ACCUMULO-3044:
----------------------------------------

[~ryanleary] I think even if multiple conditional mutations for a single row were processed
within a single row low, that the cmutations would still need to be processed serially. I
suspect this serial processing is much more expensive than acquiring the row lock only once.
  The fastest thing to do would be the following.

 # lock R1
 # check conditions for CM1, checks pass
 # check conditions for CM2, checks pass
 # check conditions for CM3, checks pass
 # write CM1,CM2, CM3 (one walog sync)
 # unlock R1

However this is problematic because CM2 does not see what will be written by CM1.  Also CM3
does not see what CM1 and CM2 will write.  Its possible that CM2 and CM3 would not pass if
their conditions saw what CM1 wrote.  Thats why the following is done on the server side now.

 # lock R1
 # check conditions for CM1, checks pass
 # write CM1
 # unlock R1
 # lock R1
 # check conditions for CM2, checks pass
 # write CM2
 # unlock R1
 # lock R1
 # check conditions for CM3, checks pass
 # write CM3
 # unlock R1

The above is slow, but I am doubtful its because of row locking.  We could try doing the following
instead and see if makes a noticeable difference, I would like to see the numbers if someone
does an experiment.

 # lock R1
 # check conditions for CM1, checks pass
 # write CM1
 # check conditions for CM2, checks pass
 # write CM2
 # check conditions for CM3, checks pass
 # write CM3
 # unlock R1


> ConditionalMutation should support conditional updates
> ------------------------------------------------------
>
>                 Key: ACCUMULO-3044
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3044
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: client, tserver
>    Affects Versions: 1.6.0
>            Reporter: Ryan Leary
>
> Currently, the ConditionalMutation object operates on a single row, and applies updates
if and only if a set of Conditions are met. 
> A new type of ConditionalMutation which operates on a single row and applies an update
if and only if a set of Conditions for that particular update would be more flexible.
> This behavior is possible currently by creating a new ConditionalMutation for each update.
In the case where there are a large number of updates for a single row, however, there is
a steep penalty paid due to the row-level locking. Another acceptable solution to this ticket
would be optimizing the ConditionalWriter to apply multiple conditional mutations on the same
row within the same atomic lock. The order of execution would need to be guaranteed.
> The API would look something like:
> {code}
> ConditionalMutation cm = new ConditionalMutation(rowKey);
> cm.put(Iterable<Condition>, CF, CQ, CV, Val);
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message