Hi Eric,

UPDATE ADD is just a normal record change, the record is completely
overwritten and the version is increased, so you will have a normal
ConcurrentModificationException if two operations happen at the same time.
My general advice in these cases is to use a commit/retry strategy. If you
are doing it via SQL, just do

BEGIN;
UPDATE... ADD...;
COMMIT RETRY 10;

This way you will avoid lock overheads in most of the cases and you will
have a retry only when it's strictly needed.

I hope it helps

Thanks

Luigi


2017-11-12 19:11 GMT+01:00 Eric24 <[email protected]>:

> To follow up on this, would LOCK RECORD be necessary? If I didn't want to
> incur the lock overhead, is there a way to set the concurrency strategy on
> the transaction (i.e. normally use "version", but select "automerge" for
> this operation)?
>
>
> On Saturday, November 11, 2017 at 6:53:27 PM UTC-6, Eric24 wrote:
>>
>> If two clients perform an UPDATE ADD on the same record at the same time,
>> do both ADD operations always succeed without an exception (since they
>> can't conflict with each other by definition)? What about two PUT
>> operations, with different/non-conflicting keys?
>>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "OrientDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to