From e6d85cb36a2558fcbf72dc08455a7caebe0ff9b8 Mon Sep 17 00:00:00 2001
From: Pierre Souchay
Date: Tue, 20 Feb 2018 23:57:28 +0100
Subject: [PATCH] Fixed comments for function maxIndexForService
---
agent/consul/state/catalog.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go
index 07975f53c..454b34082 100644
--- a/agent/consul/state/catalog.go
+++ b/agent/consul/state/catalog.go
@@ -760,8 +760,9 @@ func (s *Store) ServicesByNodeMeta(ws memdb.WatchSet, filters map[string]string)
}
// maxIndexForService return the maximum Raft Index for a service
-// If the index is not set for the service, it will return the max
-// Raft Index of "nodes", "services"
+// If the index is not set for the service, it will return:
+// - maxIndex(nodes, services) if checks if false
+// - maxIndex(nodes, services, checks) if checks if false
func maxIndexForService(tx *memdb.Txn, serviceName string, checks bool) (uint64, error) {
transaction, err := tx.First("index", "id", serviceIndexName(serviceName))
if err == nil {