Skip to content

feat: add bounded client retry for admission rejections - #3

Merged
achraf059 merged 3 commits into
mainfrom
feat/client-rejection-retry
Sep 7, 2026
Merged

feat: add bounded client retry for admission rejections#3
achraf059 merged 3 commits into
mainfrom
feat/client-rejection-retry

Conversation

@achraf059

Copy link
Copy Markdown
Owner

Summary

Adds optional bounded client-side retry for retryable admission rejections.

The coordinator already returns a typed SUBMIT_REJECTED response when the active-job admission limit is reached. This change allows clients to optionally retry those side-effect-free rejections using bounded exponential backoff with full jitter.

Retry remains disabled by default.

What changed

  • Added ClientRetryPolicy
  • Added SubmitRetrier
  • Fixed SubmitRejectedException.retryable() to honor the wire-provided retryable flag
  • Added opt-in CLI flags:
    • --submit-retries
    • --submit-retry-base-millis
    • --submit-retry-max-millis
  • Kept retry backoff outside the synchronized wire request/response section
  • Preserved benchmark behavior unchanged
  • Added deterministic unit tests and end-to-end integration coverage
  • Updated README, protocol documentation, and design decisions

Safety semantics

Automatic retry is limited to typed SUBMIT_REJECTED responses with retryable=true.

Transport or protocol failures are intentionally not retried automatically because the client cannot know whether the coordinator accepted the submission before the connection failed. Blindly resending in that case could create duplicate jobs.

Verification

  • ./mvnw clean verify — BUILD SUCCESS
  • git diff --check — clean
  • 13 new client unit tests
  • 3 new integration tests
  • Integration suite total: 37 tests

@achraf059
achraf059 merged commit ccfbc09 into main Sep 7, 2026
1 check passed
@achraf059
achraf059 deleted the feat/client-rejection-retry branch September 7, 2026 05:12
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