From ae8aa66cd7d9c339d6e0131555e306a5b0baff6b Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Tue, 11 Aug 2020 15:13:25 -0700 Subject: [PATCH] Backport catalog index fix to 1.8.x --- agent/consul/state/catalog.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go index 4d0b820dec..18edd648b3 100644 --- a/agent/consul/state/catalog.go +++ b/agent/consul/state/catalog.go @@ -1690,16 +1690,13 @@ func (s *Store) ensureCheckTxn(tx *memdb.Txn, idx uint64, preserveIndexes bool, } } } - if modified { + if modified && !preserveIndexes { // We update the modify index, ONLY if something has changed, thus // With constant output, no change is seen when watching a service // With huge number of nodes where anti-entropy updates continuously // the checks, but not the values within the check hc.ModifyIndex = idx } - if !preserveIndexes { - hc.ModifyIndex = idx - } // TODO (state store) TODO (catalog) - should we be reinserting at all. Similar // code in ensureServiceTxn simply returns nil when the service being inserted