acquireWriteLock with timeout #631

Open
pietermartin opened this Issue Mar 17, 2013 · 8 comments

Projects

None yet

8 participants

Add a feature to Transaction.acquireWriteLock( PropertyContainer entity ) to include a timeout.

That way a client can be sure that threads will throw an exception rather than waiting indefinitely.

Thanks

Owner

+1 I think it's a good feature

Member
jexp commented Mar 25, 2013

+1

Contributor

In HA this is actually needed: if a slave attempts to grab a write lock it will make an attempt on the master. The network connection might actually time out waiting for the lock, leading to BlockingReadTimeoutException, which is totally unhelpful. If the client within the same transaction tries again, it will get weird exceptions as long as the initial call is still hanging from the acquireWriteLock on master. Big +1 from me.

I'm sitting here looking at my first HA cluster delivering me screenfuls full of BlockingReadTimeoutException errors. +1 from me too... is there any workaround for this at the moment?

Contributor

@darrellberry AFAIK the only way around it, so to speak, is to increase the timeout. The setting is ha.lock_read_timeout, which defaults to 20 seconds. To increase it to e.g. 30 seconds add "ha.lock_read_timeout=30s" to neo4j.properties

Thanks will try that
On 14 May 2013 03:58, "Rickard Öberg" notifications@github.com wrote:

@darrellberry https://github.com/darrellberry AFAIK the only way around
it, so to speak, is to increase the timeout. The setting is
ha.lock_read_timeout, which defaults to 20 seconds. To increase it to e.g.
30 seconds add "ha.lock_read_timeout=30s" to neo4j.properties


Reply to this email directly or view it on GitHubhttps://github.com/neo4j/neo4j/issues/631#issuecomment-17854146
.

mafuba commented Jan 13, 2014

This is still a problem in HA in 1.9.5.

@Mats-SX Mats-SX removed the area-embedded label Sep 1, 2015
Contributor
jakewins commented Dec 5, 2015

As this is a feature request, relabeling as such and tagging it as a kernel feature

@jakewins jakewins added kernel and removed bug labels Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment