Skip to content

objectstore: singleflight STS mints and retry - #3838

Draft
Diamond (diamondburned) wants to merge 1 commit into
agent-substrate:mainfrom
diamondburned:fix/objectstore-issuer-race-and-sts-retry
Draft

Diamond (diamondburned) wants to merge 1 commit into
agent-substrate:mainfrom
diamondburned:fix/objectstore-issuer-race-and-sts-retry

Conversation

@diamondburned

Copy link
Copy Markdown

Summary

Concurrent snapshot transfers for the same actor triggered duplicate STS token exchanges in gcsissuer.Issuer without retry on HTTP 429 or 5xx responses, while exchangeclient pinned each node's gRPC channel to a single ate-api-server replica via default pick_first load balancing.

  • Coalesces concurrent unforced Issuer.Issue calls per actor UID when an in-flight mint covers the requested grants, atomically evicting zero-waiter cancelled flights under Issuer.mu and preserving wider longer-lived cached entries across concurrent mints.
  • Retries transient STS and IAM Credentials 429, 5xx, transport, and truncated-body errors with bounded jittered backoff.
  • Configures round_robin gRPC load balancing on exchangeclient.

Verification

  • go test -race -count=3 -shuffle=on ./internal/objectstoreplugin/... ./cmd/objectstore-plugin/...
  • ./hack/verify/boilerplate.sh && ./hack/verify/gofmt.sh && ./hack/verify/package-deps.sh

🤖 PR was made with the use of generative AI.

Concurrent snapshot transfers for the same actor triggered duplicate STS
token exchanges in gcsissuer.Issuer without retry on HTTP 429 or 5xx
responses, while exchangeclient pinned each node's gRPC channel to a
single ate-api-server pod via default pick_first balancing.

Coalesce concurrent unforced Issuer.Issue calls per actor UID when an
in-flight mint covers the requested grants, atomically evicting
zero-waiter cancelled flights under Issuer.mu and preserving wider
longer-lived cached entries across concurrent mints. Retry transient STS
and IAM Credentials 429, 5xx, transport, and truncated-body errors with
bounded jittered backoff, and configure round_robin load balancing on
exchangeclient.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant