mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-18 18:38:08 -05:00
Merge remote-tracking branch 'remotes/from/ce/main'
This commit is contained in:
commit
8cf066a171
2 changed files with 14 additions and 1 deletions
3
changelog/_12313.txt
Normal file
3
changelog/_12313.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
```release-note:improvement
|
||||
secrets/kmip (Enterprise): Obey configured best_effort_wal_wait_duration when forwarding kmip requests.
|
||||
```
|
||||
|
|
@ -33,7 +33,17 @@ func (e extendedSystemViewImpl) ForwardGenericRequest(ctx context.Context, req *
|
|||
ctx = namespace.ContextWithNamespace(ctx, e.mountEntry.Namespace())
|
||||
ctx = logical.IndexStateContext(ctx, &logical.WALState{})
|
||||
ctx = context.WithValue(ctx, ctxKeyForwardedRequestMountAccessor{}, e.mountEntry.Accessor)
|
||||
return forward(ctx, e.core, req)
|
||||
resp, err := forward(ctx, e.core, req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if req.LastRemoteWAL() > 0 && !e.core.EntWaitUntilWALShipped(ctx, req.LastRemoteWAL()) {
|
||||
if resp == nil {
|
||||
resp = &logical.Response{}
|
||||
}
|
||||
resp.AddWarning("Timeout hit while waiting for local replicated cluster to apply primary's write; this client may encounter stale reads of values written during this operation.")
|
||||
}
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
return nil, logical.ErrReadOnly
|
||||
|
|
|
|||
Loading…
Reference in a new issue