jankotek / mapdb

MapDB provides concurrent Maps, Sets and Queues backed by disk storage or off-heap-memory. It is a fast and easy to use embedded Java database engine.
https://mapdb.org
Apache License 2.0
4.89k stars 873 forks source link

Blocking issue in dependency #1049

Open subashsakthivel opened 1 month ago

subashsakthivel commented 1 month ago

I was got thread dump for my product , But got unusual results , most of the threads are in blocking state

Thread CPU Utilization: [Delta:10.9375%,Total:5.9102166998216505%] [Delta:10.9375%,Total:5.9115777211176255%] [Delta:3.0879446640316206%,Total:5.910804326115022%] 
"ForkJoinPool.commonPool-worker-14" Id=2536 BLOCKED on org.eclipse.collections.impl.list.mutable.primitive.SynchronizedLongList@b1c557c owned by "ForkJoinPool.commonPool-worker-2" Id=1274
    at org.eclipse.collections.impl.list.mutable.primitive.SynchronizedLongList.get(SynchronizedLongList.java:70)
    -  blocked on org.eclipse.collections.impl.list.mutable.primitive.SynchronizedLongList@b1c557c
    at org.mapdb.StoreDirectAbstract.recidToOffset(StoreDirectAbstract.kt:52)
    at org.mapdb.StoreDirect.getIndexVal(StoreDirect.kt:127)
    at org.mapdb.StoreDirect.get(StoreDirect.kt:523)
    at org.mapdb.BTreeMap.getNode(BTreeMap.kt:800)
    at org.mapdb.BTreeMap.access$getNode(BTreeMap.kt:72)
    at org.mapdb.BTreeMap$descendingLeafIterator$1.advance(BTreeMap.kt:1409)
    at org.mapdb.BTreeMap$descendingLeafIterator$1.next(BTreeMap.kt:1428)

Why did the threads was in blocking state entirely? After compaction of mapDB , the blocking was released.