auth: print warning log when error is ErrAuthOldRevision
@@ -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
}
