From a4cb0154809d619a6019a1af88baab01555f8244 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Mon, 11 Dec 2017 13:26:27 -0500 Subject: [PATCH] No longer unidle shard during recovery Previously we would unidle a primary shard during recovery in case the recovery target would miss a background global checkpoint sync. However, the background global checkpoint syncs are no longer tied to the primary shard falling idle and so this unidling is no longer needed. Relates #27757 --- .../main/java/org/elasticsearch/index/shard/IndexShard.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java index bce13cce401c9..8aee866b56e0e 100644 --- a/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java +++ b/core/src/main/java/org/elasticsearch/index/shard/IndexShard.java @@ -1755,11 +1755,6 @@ public void waitForOpsToComplete(final long seqNo) throws InterruptedException { public void initiateTracking(final String allocationId) { verifyPrimary(); getEngine().seqNoService().initiateTracking(allocationId); - /* - * We could have blocked so long waiting for the replica to catch up that we fell idle and there will not be a background sync to - * the replica; mark our self as active to force a future background sync. - */ - active.compareAndSet(false, true); } /**