accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keith Turner <>
Subject Re: Transaction type query in accumulo
Date Mon, 02 Nov 2015 16:00:54 GMT
On Fri, Oct 30, 2015 at 7:36 AM, shweta.agrawal <>

> Hi,
> Is transaction type facility available in Accumulo?
> I have read about transaction in accumulo which says " Accumulo
> guarantees these ACID properties for a single mutation (a set of changes
> for a single row) but does not provide support for atomic updates across
> multiple rows"
> In my case:
> If one thread is updating the fields of a document then this document
> should be locked so that other thread cannot modify that document.
> I am trying to achieve this by a query through conditional mutation. I am
> checking whether the particular entry exist or not  then updating. But the
> problem is I am doing this through 150 threads. If one thread finds and
> updating particular entry then other thread should not get it.
> So is this the case in conditional write?

This could be done with a conditional write and a sequence number column
per row.

Could do something like the following

  * Read row using isolated scanner or whole row iterator.
  * Assume row has a column like sync:seq.
  * Make changes to row in client.
  * Write conditional mutation with condition that sync:seq is what was
read earlier.  Also increment the sequence number

With this pattern only one client can succesfully read-modify-write a row
concurrently.  In the case where the column synch:seq does not exist, the
conditional mutation should assert it does not exist and set it to an
initial value.

Is this what you are looking for?  Or are you trying to do something else?

> We are achieving same thing through mongoDB by find and modify feature.
> If one thread get particular document to update from conditional write
> then other thread should get that particular document.
> Please provide your inputs
> Thanks
> Shweta

View raw message