You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.
Right now, I'm pretty sure that the TimeoutHashMap implementation is not threadsafe. This places a large burden on DefaultRPCSender to manage synchronization. Otherwise, two calls to put(...) could corrupt the underlying data structure. With the current timeout thread running, there is a race condition that could get really ugly under load.
The fix for this particular race is to have TimeoutHashMap extend from ConcurrentHashMap - but I would prefer to consider a different design for TimeoutHashMap (I will open another issue on that).
The text was updated successfully, but these errors were encountered:
Right now, I'm pretty sure that the TimeoutHashMap implementation is not threadsafe. This places a large burden on DefaultRPCSender to manage synchronization. Otherwise, two calls to put(...) could corrupt the underlying data structure. With the current timeout thread running, there is a race condition that could get really ugly under load.
I have committed load test demonstrates one of the issues within a few seconds (I believe that there are other concurrency issues as well, but this hits an easy one) - see https://github.com/ghetolay/jwamp/blob/master/jwamp-core/src/test/java/com/github/ghetolay/jwamp/utils/TimeoutHashMapLoadTest.java
The fix for this particular race is to have TimeoutHashMap extend from ConcurrentHashMap - but I would prefer to consider a different design for TimeoutHashMap (I will open another issue on that).
The text was updated successfully, but these errors were encountered: