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:
vivekpatani
2022-08-31 13:07:11 -07:00
parent 1e2682301c
commit c0ef7d52e0
3 changed files with 166 additions and 3 deletions

View File

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