authorize: refactor store locking (#2151)

* authorize: refactor store locking

* fix nil reference panic
This commit is contained in:
Caleb Doxsey 2021-04-29 08:37:27 -06:00 committed by GitHub
parent 9215833a0b
commit c85c8b0778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 82 additions and 55 deletions

View file

@ -156,8 +156,8 @@ func (syncer *Syncer) sync(ctx context.Context) error {
}
log.Debug(syncer.logCtx(ctx)).
Uint("version", uint(res.Record.GetVersion())).
Str("id", res.Record.Id).
Uint("version", uint(res.GetRecord().GetVersion())).
Str("id", res.GetRecord().GetId()).
Msg("syncer got record")
if syncer.recordVersion != res.GetRecord().GetVersion()-1 {