diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go index 16fb62cdf..9c3cb3a29 100644 --- a/agent/consul/state/catalog.go +++ b/agent/consul/state/catalog.go @@ -759,9 +759,9 @@ func (s *Store) ServicesByNodeMeta(ws memdb.WatchSet, filters map[string]string) return idx, results, nil } -// maxIndexForService return the maximum transaction number for a service -// If the transaction is not set for the service, it will return the max -// transaction number of "nodes", "services" +// 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" func maxIndexForService(tx *memdb.Txn, serviceName string) (uint64, error) { transaction, err := tx.First("index", "id", serviceIndexName(serviceName)) if err == nil { diff --git a/agent/consul/state/catalog_test.go b/agent/consul/state/catalog_test.go index f3d9f3e8d..89745389e 100644 --- a/agent/consul/state/catalog_test.go +++ b/agent/consul/state/catalog_test.go @@ -2168,6 +2168,7 @@ func TestStateStore_DeleteCheck(t *testing.T) { func ensureServiceVersion(t *testing.T, s *Store, ws memdb.WatchSet, serviceID string, expectedIdx uint64, expectedSize int) { idx, services, err := s.ServiceNodes(ws, serviceID) + t.Helper() if err != nil { t.Fatalf("err: %s", err) }