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