From ebe256d61c0456e58fd8ce479d7a5947f908ad25 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 5672a9440..802974584 100644 --- a/auth/store.go +++ b/auth/store.go @@ -851,8 +851,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 }