-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Guidelines
- ONgDB version: Enterprise 1.0.4
- Operating system: AlmaLinux 9
- API/Driver: NodeJS Neo4j driver 4.0.2
I have a student that implemented a strange Promise pattern that didn't accomplish what he thought it was doing, and the result was a DB deadlock:
Neo4jError: ForsetiClient[9] can't accquire ExclusiveLock{owner=ForsetiClient[2]} on NODE(25474), because holders of that lock are waiting for ForsetiClient[9].
Wait list:ExclusiveLock[Client[2] waits for [9]]
The 13 queries he was firing took a variable amount of time, but are user facing queries typically so they aren't expected to be long running ones. e.g. if he was running 5 queries that write/read all the same time, and they each would normally take 5 seconds, I'd expect some kind of limit.
So I should probably implement a Deadlock error handling retry in my backend service to, within reason, see if it can field the write queries, correct?
Is there anything else I should consider? Maybe tune/configure ONGDB somehow?
How does the ONGDB/Neo4j query pointer work? Is a deadlock only possible when more than one query is trying to update the same Nodes? (shouldn't be the case where) Or when more than one query is trying to update anything at all or with the same Label/Type? Can I read unfettered, but writes are subject to Deadlocking/Blocking? What's the expectation here?
Thank you.