JanusGraph doesn't remove threadlocal tx after a transaction commit?


huangx...@...
 

By Java VisualVm, I found some StandardJanusGraphTx  "isOpen" field is false while they still live in memory.

I read the source code. A graph has a threadLocal var named txs and the reference chain is graph -> txs -> StandardJanusGraphTx.

When a transaction commit, JanusGraph doesn't call txs.remove() .In memory, the worst result:  txNum = threadNum × graphNum.

We usually remove threadlocal var in order to avoid OOM, but JanusGraph doesn't do that ,why?



Thanks.