mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-14 00:33:09 +02:00
storage: invalidate sync querier when records are updated (#5612)
## Summary Invalidate the sync querier when records are updated so that we fallback to databroker querying until the sync is complete. ## Related issues For [ENG-2377](https://linear.app/pomerium/issue/ENG-2377/core-initial-access-with-idp-accessidentity-tokens-sometimes-fails) ## Checklist - [x] reference any related issues - [x] updated unit tests - [x] add appropriate label (`enhancement`, `bug`, `breaking`, `dependencies`, `ci`) - [x] ready for review
This commit is contained in:
parent
f6b344fd9e
commit
ba0fcffe81
4 changed files with 68 additions and 13 deletions
|
@ -155,8 +155,9 @@ func InvalidateCacheForDataBrokerRecords(
|
|||
) {
|
||||
for _, record := range records {
|
||||
q := &databroker.QueryRequest{
|
||||
Type: record.GetType(),
|
||||
Limit: 1,
|
||||
Type: record.GetType(),
|
||||
Limit: 1,
|
||||
MinimumRecordVersionHint: proto.Uint64(record.GetVersion()),
|
||||
}
|
||||
q.SetFilterByIDOrIndex(record.GetId())
|
||||
GetQuerier(ctx).InvalidateCache(ctx, q)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue