Repository navigation
fix: lease state machine entities for as long as a batch may take to process - #1146
Merged
paullatzelsperger merged 1 commit intoOct 13, 2026
Conversation
…process The state machines of the issuance processes and of the credential requests leased a batch of 20 entities for 60 seconds, but a single counterparty that did not respond could hold up a batch for more than 3 minutes: the messages were sent with timeouts of 30 seconds, and retried up to 5 times by the HTTP client. Another runtime could then lease and process the same entities in the meantime. - The lease duration can be configured for each state machine (state-machine.lease-duration-millis), and defaults to 5 minutes. - The messages that are sent under the lease, i.e. delivering credentials and rejections, and sending credential requests, are sent without retries of the HTTP client, as the state machine retries them anyway, and with configurable connect and call timeouts (send.connect-timeout.ms, send.call-timeout.ms), 5 and 15 seconds by default. - The default batch size is 10, so that a batch fits into the lease, and a warning is logged if it may not. Requires eclipse-edc/Connector#6088. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
paullatzelsperger
force-pushed
the
fix/1145_lease_duration_and_send_timeouts
branch
from
October 12, 2026 12:35
35a5d26 to
1e31665
Compare
jimmarino
approved these changes
Oct 12, 2026
paullatzelsperger
deleted the
fix/1145_lease_duration_and_send_timeouts
branch
October 13, 2026 05:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR changes/adds
edc.issuer.issuance.*) and credential requests(
edc.iam.credential.request.*), can be configured withstate-machine.lease-duration-millis, and defaults to5 minutes. The SQL stores of the issuance processes and of the credential requests lease their entities for that
long.
credential requests, are sent with an HTTP client that does not retry them, as the state machine retries the
operation anyway, and that gives up after configurable timeouts:
send.connect-timeout.ms(5 s) andsend.call-timeout.ms(15 s). The status polling of credential requests uses that client as well.logged at startup if the batch size times the call timeout is not less than the lease duration.
Why it does that
A state machine leases a batch of entities at once, and processes them one by one. The lease lasted 60 seconds, but a
single counterparty that did not respond could hold up a batch for more than 3 minutes: the messages were sent with
connect and read timeouts of 30 seconds each, and retried up to 5 times by the HTTP client. Another runtime could then
lease and process the same entities in the meantime, e.g. issue and deliver the credentials of an issuance process
twice, or send a credential request again.
Checking before each entity of a batch that the lease is still held is left to a separate PR.
This depends on eclipse-edc/Connector#6088, which adds
forTime(Duration)to theSqlLeaseContextBuilderSPI. Itdoes not compile until a Connector snapshot with it is published.
Linked Issue(s)
Closes #1145
🤖 Generated with Claude Code