amazon-archives / dynamodb-janusgraph-storage-backend

The Amazon DynamoDB Storage Backend for JanusGraph
Apache License 2.0
446 stars 99 forks source link

shutdown does not close client thread pool #192

Open trekie86 opened 7 years ago

trekie86 commented 7 years ago

https://github.com/awslabs/dynamodb-titan-storage-backend/blob/1.0.0/src/main/java/com/amazon/titan/diskstorage/dynamodb/DynamoDBDelegate.java#L861-L865

Shutdown method does not terminate client threadpool, causing applications to hang.

amcp commented 7 years ago

I confirmed this issue is also present in the JanusGraph implementation. I will shut down the client threadpool.

amcp commented 7 years ago

Seems like there is a liveness issue in the tests if I shutdown the threadpool on DynamoDBDelegate.shutdown(). I will investigate other options to manage the threadpool lifecycle.

trekie86 commented 7 years ago

It seems to be related to the thread pool being static. If it can be moved to a member variable and it's creation synchronized it may prevent this problem.