Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

acquireWriteLock with timeout #631

Open
pietermartin opened this Issue · 7 comments

6 participants

@pietermartin

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

@tinwelint
Collaborator

+1 I think it's a good feature

@jexp
Collaborator

+1

@rickardoberg
Collaborator

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.

@darrellberry

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?

@rickardoberg
Collaborator

@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

@darrellberry
@mafuba

This is still a problem in HA in 1.9.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.