Hi Luca,
How to to locking Console run Javascript batch scripts.
Regards
On Saturday, September 21, 2013 7:14:47 PM UTC+5:30, Lvc@ wrote:
>
> Hi all,
> I've just updated the Performance-Tuning wiki page with a tip to improve
> the cases as the email object.
>
> High concurrent updates
>
> OrientDB has an optimistic concurrency control system, but on very high
> concurrent updates on the few records it could be more efficient locking
> records to avoid retries. You could synchronize the access by yourself or
> by using the storage API. Note that this works only with non-remote
> databases.
>
> ((OStorageEmbedded)db.getStorage()).acquireWriteLock(final ORID
> iRid)((OStorageEmbedded)db.getStorage()).acquireSharedLock(final ORID
> iRid)((OStorageEmbedded)db.getStorage()).releaseWriteLock(final ORID
> iRid)((OStorageEmbedded)db.getStorage()).releaseSharedLock(final ORID iRid)
>
> Example of usage. Writer threads:
>
> try{
> ((OStorageEmbedded)db.getStorage()).acquireWriteLock(record.getIdentity());
>
> // DO SOMETHING} finally {
> ((OStorageEmbedded)db.getStorage()).releaseWriteLock(record.getIdentity());}
>
> Reader threads:
>
> try{
> ((OStorageEmbedded)db.getStorage()).acquireSharedLock(record.getIdentity());
> // DO SOMETHING
> } finally {
>
> ((OStorageEmbedded)db.getStorage()).releaseSharedLock(record.getIdentity());}
>
>
> <https://github.com/orientechnologies/orientdb/wiki/Performance-Tuning#file-system-access-strategy>
>
>
> For more information:
> https://github.com/orientechnologies/orientdb/wiki/Performance-Tuning#high-concurrency
>
--
---
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/groups/opt_out.