From ef6320e6382f76e87c74a77a496dbe3f971a419b Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Mon, 25 Jan 2016 08:16:05 +0800 Subject: [PATCH] etcdserver: make cluster checking interval shorter --- etcdserver/server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etcdserver/server.go b/etcdserver/server.go index 13d9fe560..18a0b79f8 100644 --- a/etcdserver/server.go +++ b/etcdserver/server.go @@ -62,8 +62,11 @@ const ( StoreClusterPrefix = "/0" StoreKeysPrefix = "/1" - purgeFileInterval = 30 * time.Second - monitorVersionInterval = 5 * time.Second + purgeFileInterval = 30 * time.Second + // monitorVersionInterval should be smaller than the timeout + // on the connection. Or we will not be able to resue the connection + // (since it will timeout). + monitorVersionInterval = rafthttp.ConnWriteTimeout - time.Second databaseFilename = "db" // max number of in-flight snapshot messages etcdserver allows to have