server,test: refresh cache on each NewAuthStore

- permissions were incorrectly loaded on restarts.
- #14355
- Backport of https://github.com/etcd-io/etcd/pull/14358

Signed-off-by: vivekpatani <9080894+vivekpatani@users.noreply.github.com>
This commit is contained in:
Vivek Patani
2022-08-31 12:54:06 -07:00
committed by vivekpatani
parent ba52d5a063
commit 7639d93f15
3 changed files with 161 additions and 0 deletions

View File

@@ -1073,6 +1073,8 @@ func NewAuthStore(lg *zap.Logger, be backend.Backend, tp TokenProvider, bcryptCo
as.setupMetricsReporter()
as.refreshRangePermCache(tx)
tx.Unlock()
be.ForceCommit()