commit | 08fbf268dc976bec847dfc2b2461817cb7f67c8c | [log] [tgz] |
---|---|---|
author | Michael Blow <mblow@apache.org> | Sat May 22 11:27:29 2021 -0400 |
committer | Michael Blow <mblow@apache.org> | Sat May 22 23:13:45 2021 +0000 |
tree | c29a27a05ad79b38a7b5c6c6c5815a3767a6566f | |
parent | 36ada864f54ba1551ffecb38338f878bf8a7fa9c [diff] |
[NO ISSUE][EXT] enable override of active recovery Change-Id: I50639d8b61af5d9d0068433ab132d76e363f7bef Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/11583 Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mblow@apache.org>
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 e18e50c..0242ecd 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
@@ -434,6 +434,10 @@ } } + protected synchronized void doRecover(MetadataProvider metadataProvider) throws HyracksDataException { + doStart(metadataProvider); + } + private void cancelJob(Throwable th) { cancelJobSafely(metadataProvider, th); final WaitForStateSubscriber cancelSubscriber =
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java index 968876d..3bc1c28 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/active/RecoveryTask.java
@@ -125,7 +125,7 @@ try { if (!cancelRecovery && listener.getState() == ActivityState.TEMPORARILY_FAILED) { listener.setState(ActivityState.RECOVERING); - listener.doStart(metadataProvider); + listener.doRecover(metadataProvider); } LOGGER.log(level, "Recovery completed successfully"); return null; @@ -141,7 +141,7 @@ releaseRecoveryLocks(metadataProvider); } } while (policy.retry(failure)); - // Recovery task is essntially over now either through failure or through cancellation(stop) + // Recovery task is essentially over now either through failure or through cancellation(stop) synchronized (listener) { listener.notifyAll(); if (listener.getState() != ActivityState.TEMPORARILY_FAILED