Skip to content

Make eager activity reservation limit configurable#2970

Merged
Sushisource merged 3 commits into
mainfrom
eager-activity-slot-limit
Jul 24, 2026
Merged

Make eager activity reservation limit configurable#2970
Sushisource merged 3 commits into
mainfrom
eager-activity-slot-limit

Conversation

@Sushisource

@Sushisource Sushisource commented Jul 24, 2026

Copy link
Copy Markdown
Member

What changed

  • Add maxEagerActivityReservationsPerWorkflowTask to WorkerOptions.
  • Replace the hardcoded per-workflow-task eager activity reservation cap with the configured value.
  • Preserve the existing default of three; setting the option to zero disables eager activity reservations.
  • Cover option copying/defaults and configured request limiting.

Why

Workers already cap the number of slots they attempt to reserve for eager activities while completing a workflow task. Making that cap configurable lets applications tune the reservation burst without introducing a separate execution-lifetime limit.

Validation

  • ./gradlew --offline :temporal-sdk:test --tests io.temporal.internal.worker.EagerActivitySlotsReservationTest --tests io.temporal.worker.WorkerOptionsTest
  • ./gradlew --no-daemon :temporal-sdk:spotlessCheck

No breaking changes; the default remains three.

@Sushisource Sushisource changed the title Expose eager activity concurrency limit Make eager activity reservation limit configurable Jul 24, 2026
@Sushisource
Sushisource marked this pull request as ready for review July 24, 2026 21:02
@Sushisource
Sushisource requested a review from a team as a code owner July 24, 2026 21:03
@Sushisource
Sushisource force-pushed the eager-activity-slot-limit branch from d8809a6 to 323e49f Compare July 24, 2026 22:13
@Sushisource
Sushisource merged commit f68c9bc into main Jul 24, 2026
17 of 18 checks passed
@Sushisource
Sushisource deleted the eager-activity-slot-limit branch July 24, 2026 23:20
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.

2 participants