Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per transaction configuration of LockMode for Berkeley #293

Closed
gjdev opened this issue May 29, 2013 · 1 comment
Closed

Per transaction configuration of LockMode for Berkeley #293

gjdev opened this issue May 29, 2013 · 1 comment
Assignees
Milestone

Comments

@gjdev
Copy link

gjdev commented May 29, 2013

Currently when using the Berkeley backend, it is not possible to have concurrent transactions that do mutations on the same data, without getting PermanentStorageException (caused by sleepycat LockTimeOutException). That's because in the typical read-modify-write logic imposed by Titan, the concurrent transaction will deadlock when they try to promote their locks from READ to WRITE. (Which will lead to LockTimeoutException for all but one of the concurrent transactions).

The way to prevent these timeout exceptions is to use LockMode.RMW in transactions that mutate data. It's currently impossible to configure that with Titan.

This is request is related to #71.

@ghost ghost assigned mbroecheler Dec 8, 2013
@ghost ghost assigned dalaro Dec 18, 2013
@dalaro
Copy link
Member

dalaro commented Jan 31, 2014

cc2b3a5 on titan05 adds a storage.lock-mode option that accepts any of the BDB LockMode enum values (DEFAULT, READ_UNCOMMITTED, READ_COMMITTED, RMW).

Similar to #71, the option can be set two ways:

In the transaction configuration, e.g. g.buildTransaction().setCustomOption("storage.lock-mode", "RMW").start().

In the graph configuration, e.g. storage.lock-mode=RMW in titan's properties file, which becomes the default LockMode for all transactions that don't specify their own LockMode as shown above.

@dalaro dalaro closed this as completed Jan 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants