From 3586e38c409f47004fc2a3882e5a9f956beace84 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Wed, 9 Jul 2014 11:40:28 +0200 Subject: [PATCH] [Discovery] Start master fault detection after pingInterval This is to allow the master election to complete on the chosen master. Relates to #6706 --- .../elasticsearch/discovery/zen/fd/MasterFaultDetection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java b/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java index b2a17165b6a..b601884002c 100644 --- a/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java +++ b/src/main/java/org/elasticsearch/discovery/zen/fd/MasterFaultDetection.java @@ -156,8 +156,8 @@ public class MasterFaultDetection extends AbstractComponent { } this.masterPinger = new MasterPinger(); - // we use schedule with a 0 time value to run the pinger on the pool as it will run on later - threadPool.schedule(TimeValue.timeValueMillis(0), ThreadPool.Names.SAME, masterPinger); + // we start pinging slightly later to allow the chosen master to complete it's own master election + threadPool.schedule(pingInterval, ThreadPool.Names.SAME, masterPinger); } public void stop(String reason) {