Hi J5, take a look at this issue: https://github.com/orientechnologies/orientdb/issues/1056
Lvc@ On 28 February 2014 16:58, Jonathan Cook <[email protected]> wrote: > Luca, > > This is exactly the info that I need right now as I'm having many problems > with concurrent update issues on "root" records, simply from adding > lightweight edges between those records and related vertices. > > However, because I'm heavily leveraging tinkerpop/frames, I'm unsure where > and how I can cleanly insert this orient-specific record-locking. Do you > have any suggestions or are there other members who have encountered this > and have suggestions? > > At the moment as a workaround I've put off creating the problematic edges > in one case. In another, introduced arbitrary delays in another in order > to try to avoid attempts at concurrent access. > > Any help is much appreciated. > > Regards, > Jonathan 'J5' Cook > > > On Saturday, September 21, 2013 9:44:47 AM UTC-4, 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. > -- --- 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.
