You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ra...@apache.org on 2022/03/08 19:33:22 UTC
[atlas] branch master updated: ATLAS-4549: Issue with brining up Atlas in HA enabled mode with Index recovery enabled
This is an automated email from the ASF dual-hosted git repository.
radhikakundam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 6dad2f6 ATLAS-4549: Issue with brining up Atlas in HA enabled mode with Index recovery enabled
6dad2f6 is described below
commit 6dad2f6f35c97cb3fee82c5aee7aa932325e688a
Author: Radhika Kundam <rk...@cloudera.com>
AuthorDate: Fri Feb 4 13:30:34 2022 -0800
ATLAS-4549: Issue with brining up Atlas in HA enabled mode with Index recovery enabled
Signed-off-by: radhikakundam <ra...@apache.org>
---
.../atlas/repository/graph/IndexRecoveryService.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java b/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java
index 57964d5..caf3163 100644
--- a/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java
+++ b/repository/src/main/java/org/apache/atlas/repository/graph/IndexRecoveryService.java
@@ -123,7 +123,11 @@ public class IndexRecoveryService implements Service, ActiveStateChangeHandler {
@Override
public void instanceIsPassive() throws AtlasException {
- LOG.info("IndexRecoveryService.instanceIsPassive(): no action needed.");
+ LOG.info("==> IndexRecoveryService.instanceIsPassive()");
+
+ stop();
+
+ LOG.info("<== IndexRecoveryService.instanceIsPassive()");
}
@Override
@@ -138,7 +142,13 @@ public class IndexRecoveryService implements Service, ActiveStateChangeHandler {
return;
}
- indexHealthMonitor.start();
+ try {
+ if (indexHealthMonitor.getState() == Thread.State.NEW) {
+ indexHealthMonitor.start();
+ }
+ } catch (Exception ex) {
+ LOG.error("Error while starting Index Health Monitor", ex);
+ }
}
private static class RecoveryThread implements Runnable {