Xikui Wang has submitted this change and it was merged.

Change subject: [NO ISSUE][RT] Remove runtime from ActiveManager after it stops
......................................................................


[NO ISSUE][RT] Remove runtime from ActiveManager after it stops

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

Details:
The runtime should not be removed before it's fully stopped. This may
causes issues when downstream operators need to access runtime during
shutdown.

Change-Id: I07c6398f46d4bb6d29b270aa71dee36e0d0917ae
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2494
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: abdullah alamoudi <[email protected]>
---
M 
asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, approved
  Jenkins: Verified; No violations found; ; Verified



diff --git 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
index bb76204..2aebc59 100644
--- 
a/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
+++ 
b/asterixdb/asterix-active/src/main/java/org/apache/asterix/active/ActiveManager.java
@@ -178,7 +178,7 @@
 
     private void stopIfRunning(ActiveRuntimeId runtimeId, IActiveRuntime 
runtime)
             throws HyracksDataException, InterruptedException {
-        if (runtimes.remove(runtimeId) != null) {
+        if (runtimes.containsKey(runtimeId)) {
             runtime.stop();
         } else {
             LOGGER.info("Not stopping already stopped runtime " + runtimeId);

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2494
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I07c6398f46d4bb6d29b270aa71dee36e0d0917ae
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Xikui Wang <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>

Reply via email to