mirror of https://github.com/status-im/consul.git
Clean up dead code, issue addressed by passing ws to serviceGatewayNodes
This commit is contained in:
parent
3b1b24c2ce
commit
3afe816a94
|
@ -2035,7 +2035,6 @@ func (s *Store) checkServiceNodesTxn(tx *memdb.Txn, ws memdb.WatchSet, serviceNa
|
||||||
// Gateways are tracked in a separate table, and we append them to the result set.
|
// Gateways are tracked in a separate table, and we append them to the result set.
|
||||||
// We append rather than replace since it allows users to migrate a service
|
// We append rather than replace since it allows users to migrate a service
|
||||||
// to the mesh with a mix of sidecars and gateways until all its instances have a sidecar.
|
// to the mesh with a mix of sidecars and gateways until all its instances have a sidecar.
|
||||||
var gatewayNodesCh <-chan struct{}
|
|
||||||
if connect {
|
if connect {
|
||||||
// Look up gateway nodes associated with the service
|
// Look up gateway nodes associated with the service
|
||||||
_, nodes, _, err := s.serviceGatewayNodes(tx, ws, serviceName, structs.ServiceKindTerminatingGateway, entMeta)
|
_, nodes, _, err := s.serviceGatewayNodes(tx, ws, serviceName, structs.ServiceKindTerminatingGateway, entMeta)
|
||||||
|
@ -2105,11 +2104,6 @@ func (s *Store) checkServiceNodesTxn(tx *memdb.Txn, ws memdb.WatchSet, serviceNa
|
||||||
fallbackWS = ws
|
fallbackWS = ws
|
||||||
// We also need to watch the iterator from earlier too.
|
// We also need to watch the iterator from earlier too.
|
||||||
fallbackWS.Add(iter.WatchCh())
|
fallbackWS.Add(iter.WatchCh())
|
||||||
|
|
||||||
// This channel will be nil if there are no known associations between the service and a gateway
|
|
||||||
if gatewayNodesCh != nil {
|
|
||||||
fallbackWS.Add(gatewayNodesCh)
|
|
||||||
}
|
|
||||||
} else if connect {
|
} else if connect {
|
||||||
// If this is a connect query then there is a subtlety to watch out for.
|
// If this is a connect query then there is a subtlety to watch out for.
|
||||||
// In addition to watching the proxy service indexes for changes above, we
|
// In addition to watching the proxy service indexes for changes above, we
|
||||||
|
|
Loading…
Reference in New Issue