Skip to content

Commit

Permalink
Get rid of log messages from SrvKeyspaceWatcher when no node/key
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord committed Jun 1, 2023
1 parent d6a9f33 commit bbbb351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/srvtopo/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (entry *watchEntry) onErrorLocked(err error, init bool) {
// This watcher will able to continue to return the last value till it is not able to connect to the topo server even if the cache TTL is reached.
// TTL cache is only checked if the error is a known error i.e topo.Error.
_, isTopoErr := err.(topo.Error)
if isTopoErr && time.Since(entry.lastValueTime) > entry.rw.cacheTTL {
if entry.value != nil && isTopoErr && time.Since(entry.lastValueTime) > entry.rw.cacheTTL {
log.Errorf("WatchSrvKeyspace clearing cached entry for %v", entry.key)
entry.value = nil
}
Expand Down

0 comments on commit bbbb351

Please sign in to comment.