-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40493/
-----------------------------------------------------------
Review request for geode and Eric Shu.
Bugs: GEODE-438
https://issues.apache.org/jira/browse/GEODE-438
Repository: geode
Description
-------
The intermittent failure was caused by the order of the put and destroy being
delivered to the OffHeapMemoryUsageListener being switched on the remote
member. This caused the last event it delivered to be the put one so it stayed
critical.
The fix is to have the listener wake up frequently and do a quick check to see
if an event needs to be sent.
This happens in a background thread and the check is cheap so it is currently
done every 10 milliseconds.
This allows the threads that are actually doing off-heap allocations and frees
to do less work. They do a quick
check to see if it looks like their change might have caused an event to be
needed. If so they simply tell the
listener to deliver an event. But the listener always goes back to the
MemoryAllocator and asks it how much
memory is currently allocated to ensure that the event it delivers now reflects
the current off-heap memory usage.
Also fixed test to use standard locators for connectivity instead of an
mcast-port.
Diffs
-----
gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
81d46ff5dbd30761f31c03621574ce96551ceff4
gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/OffHeapMemoryMonitor.java
721e9a6cc3c839ebf958151c29a530df49b8f564
gemfire-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
a6f24d0125a50b8c8189cddc709d6ba3ffd823e7
Diff: https://reviews.apache.org/r/40493/diff/
Testing
-------
precheckin
Thanks,
Darrel Schneider