JanusGraph / JanusGraph/janusgraph-foundationdb
FoundationDBTx restart() race condition
- Dominant language
- Java
- Stars
- 59
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
`getMultiRange` (which is synchronized) is being called which is locking the transaction. Then, a transaction reset is being triggered, likely by the time limit being exceeded by the FDB driver, on that same transaction which triggers a call to `restart()`, which is also synchronized. It can't get the lock so it's stuck and then that blocks everything.
Steps to reproduce:
`mvn -Dtest=FoundationDBOLAPTest clean package test`
This thread dump demonstrates the issue on lines 23 and 502.
[jgfdb-stack-dump.txt](https://github.com/JanusGraph/janusgraph-foundationdb/files/4982461/jgfdb-stack-dump.txt)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with FoundationDBTx#getMultiRange and restart(), then run `mvn -Dtest=FoundationDBOLAPTest clean package test` and inspect jgfdb-stack-dump.txt at lines 23 and 502. Trace the synchronized transaction/reset interaction; done means the reproduced blocking condition is resolved and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100