From 6844ebb43b88782d6d4f6ab39a1273f17ee57b35 Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Wed, 1 Feb 2017 15:51:25 -0800 Subject: [PATCH] Treat a uuid prefix lookup error as a soft error, as if a node name lookup returned nil. Add a TODO to note where a future point of logging should occur once a logger is present. --- consul/state/catalog.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/consul/state/catalog.go b/consul/state/catalog.go index e9280e979..9e5a1768f 100644 --- a/consul/state/catalog.go +++ b/consul/state/catalog.go @@ -702,10 +702,13 @@ func (s *StateStore) NodeServices(ws memdb.WatchSet, nodeNameOrID string) (uint6 return 0, nil, nil } - // Attempt to lookup the node by it's node ID + // Attempt to lookup the node by its node ID iter, err := tx.Get("nodes", "uuid_prefix", nodeNameOrID) if err != nil { - return 0, nil, fmt.Errorf("node ID lookup failed: %s", err) + ws.Add(watchCh) + // TODO(sean@): We could/should log an error re: the uuid_prefix lookup + // failing once a logger has been introduced to the catalog. + return 0, nil, nil } n = iter.Next() if n == nil {