This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Description
Collector has several background tasks that periodically scan cmap. The cmap itself is thread safe, however the ConnectionInfo objects stored in it are not. Thus the background task (timer task) will access ConnectionInfo concurrent with the request processing threads updating the ConnectionInfo objects (through the MonitorChannelHandler class).
Even though the background tasks only read the content of ConnectionInfo, the code is still racy: In the best case the data will simply be stale (see information about the Java memory model). In the worst case the background threads may get caught in infinite loops while attempting to traverse a hash map that is updated concurrently.