You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/05/24 16:31:52 UTC

[GitHub] [geode] albertogpz commented on a diff in pull request #7715: GEODE-10323: Remove schedule threads in MemoryAllocatorImpl constructor

albertogpz commented on code in PR #7715:
URL: https://github.com/apache/geode/pull/7715#discussion_r880727847


##########
geode-core/src/main/java/org/apache/geode/internal/offheap/MemoryAllocatorImpl.java:
##########
@@ -66,7 +67,9 @@ public class MemoryAllocatorImpl implements MemoryAllocator {
 
   private final ScheduledExecutorService updateNonRealTimeStatsExecutor;
 
-  private final ScheduledFuture<?> updateNonRealTimeStatsFuture;
+  private volatile ScheduledFuture<?> updateNonRealTimeStatsFuture;

Review Comment:
   I have extracted the logic to update the stats to a new class `NonRealTimeStatsUpdater`.
   I have also added a new `Supplier` parameter to several methods to be able to inject other implementations for testing.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org