You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2018/09/24 14:32:16 UTC

[3/7] asterixdb git commit: [NO ISSUE][OTH] Ensure Stats Refresh is Thread Safe

[NO ISSUE][OTH] Ensure Stats Refresh is Thread Safe

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Make variables used in determining the need to refresh
  stats volatile to ensure refresh won't be called by
  multiple thread if not needed.

Change-Id: I07d76e53d193f93e0aaf08715e3f4c82b3b1524e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2969
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mh...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/8078e65c
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/8078e65c
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/8078e65c

Branch: refs/heads/master
Commit: 8078e65c9d3c5b17d9074ce4b77ea8851ec5e4bd
Parents: 36e20b7
Author: Murtadha Hubail <mh...@apache.org>
Authored: Sat Sep 15 16:09:06 2018 +0300
Committer: Murtadha Hubail <mh...@apache.org>
Committed: Mon Sep 17 04:35:32 2018 -0700

----------------------------------------------------------------------
 .../apache/asterix/app/active/ActiveEntityEventsListener.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8078e65c/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
index b034f47..62f2c02 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/ActiveEntityEventsListener.java
@@ -92,9 +92,9 @@ public abstract class ActiveEntityEventsListener implements IActiveEntityControl
     private AlgebricksAbsolutePartitionConstraint locations;
     protected ActivityState prevState;
     protected JobId jobId;
-    protected long statsTimestamp;
+    protected volatile long statsTimestamp;
     protected String stats;
-    protected boolean isFetchingStats;
+    protected volatile boolean isFetchingStats;
     protected int numRegistered;
     protected int numDeRegistered;
     protected volatile RecoveryTask rt;