From e7291a1dab7e585eccd2cebee14557d6409dbc50 Mon Sep 17 00:00:00 2001 From: tangcong Date: Tue, 3 Mar 2020 17:26:04 +0800 Subject: [PATCH] auth: print warning log when error is ErrAuthOldRevision --- auth/store.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/auth/store.go b/auth/store.go index 02d18a6ce..44b04de06 100644 --- a/auth/store.go +++ b/auth/store.go @@ -775,8 +775,13 @@ func (as *authStore) isOpPermitted(userName string, revision uint64, key, rangeE if revision == 0 { return ErrUserEmpty } - - if revision < as.Revision() { + rev := as.Revision() + if revision < rev { + as.lg.Warn("request auth revision is less than current node auth revision", + zap.Uint64("current node auth revision", rev), + zap.Uint64("request auth revision", revision), + zap.ByteString("request key", key), + zap.Error(ErrAuthOldRevision)) return ErrAuthOldRevision }