diff --git a/agent/consul/state/catalog.go b/agent/consul/state/catalog.go index 52714468f..25a4a8568 100644 --- a/agent/consul/state/catalog.go +++ b/agent/consul/state/catalog.go @@ -1317,7 +1317,7 @@ func (s *Store) deleteServiceTxn(tx WriteTxn, idx uint64, nodeName, serviceID st // Delete any checks associated with the service. This will invalidate // sessions as necessary. - checks, err := catalogChecksForNodeService(tx, nodeName, serviceID, entMeta) + checks, err := catalogListServiceChecks(tx, nodeName, serviceID, entMeta) if err != nil { return fmt.Errorf("failed service check lookup: %s", err) } diff --git a/agent/consul/state/catalog_oss.go b/agent/consul/state/catalog_oss.go index cce6cb943..04bd7515d 100644 --- a/agent/consul/state/catalog_oss.go +++ b/agent/consul/state/catalog_oss.go @@ -157,11 +157,11 @@ func catalogListChecks(tx ReadTxn, _ *structs.EnterpriseMeta) (memdb.ResultItera } func catalogListNodeChecks(tx ReadTxn, node string) (memdb.ResultIterator, error) { - return tx.Get("checks", "node_service_check", node, false) + return tx.Get("checks", indexNodeServiceCheck, node, false) } func catalogListServiceChecks(tx ReadTxn, node string, service string, _ *structs.EnterpriseMeta) (memdb.ResultIterator, error) { - return tx.Get("checks", "node_service", node, service) + return tx.Get("checks", indexNodeService, node, service) } func catalogInsertCheck(tx WriteTxn, chk *structs.HealthCheck, idx uint64) error { @@ -177,10 +177,6 @@ func catalogInsertCheck(tx WriteTxn, chk *structs.HealthCheck, idx uint64) error return nil } -func catalogChecksForNodeService(tx ReadTxn, node string, service string, entMeta *structs.EnterpriseMeta) (memdb.ResultIterator, error) { - return tx.Get("checks", "node_service", node, service) -} - func validateRegisterRequestTxn(_ ReadTxn, _ *structs.RegisterRequest, _ bool) (*structs.EnterpriseMeta, error) { return nil, nil }