Conversation
|
@adecaro, In what scenario Is 9 seconds (3 retries of 3 seconds) really necessary? This is a race condition that warrants a failure in my opinion The client can retry on his own, or at the very most have 200 millisecond backoffs |
📊 Token Validation BenchmarkComparison of this PR against the base branch. 🟢 improvement · 🔴 regression · ➖ within ±1.0% noise.
|
@Effi-S what if we have defaults and give a way to customize this in a config file? |
AkramBitar
left a comment
There was a problem hiding this comment.
Review of the pending-status retry/backoff added to RetrieveAuditTokens.
The premise checks out: finality.Commit writes the token rows (AppendValid) and the Confirmed status in the same store transaction, so IsPending == false really does imply the rows are visible; the driver-level qe here is token/sdk/vault.QueryEngine, not the retrying token.QueryEngine wrapper, so there is no accidental 3x3 nesting; and the added latency fits inside the initiator's 1-minute ReceiveTypedWithTimeout.
go vet, golangci-lint (0 issues) and go test ./token/core/common/ all pass on this head. Finding 1 below was reproduced empirically with a throwaway test.
Five findings inline, most severe first.
On the two options in #2105The backoff (this PR) is the right thing to do now. It removes a real inconsistency: It's a mitigation rather than a fix, though. The window is network → finality-listener Suggestion 2 (the Its limits are why it doesn't replace the backoff: the cache is in-process and best-effort Proposal: merge the backoff here, and open a low-priority follow-up issue for suggestion 2 |
8f8d1e4 to
b39d029
Compare
Signed-off-by: Effi-S <effi.szt@gmail.com>
|
@AkramBitar Thanks for the review, |
Signed-off-by: Effi-S <effi.szt@gmail.com>
Fixes #2105
Adds retry/backoff to the auditor validation lookup (
AuditorCheck/RetrieveAuditTokens) so a quickly-chained transaction is no longer spuriously rejected when the async finality listener has not yet persisted a just-audited output. This mirrors the pending-status retry/backoff that the siblingAudit()path already has.