Skip to content

[PRIV-644] Add pending requests to relay DON caching in addition to completed ones - #23660

Open
vreff wants to merge 5 commits into
developfrom
relay-don-response-caching-improvements
Open

[PRIV-644] Add pending requests to relay DON caching in addition to completed ones#23660
vreff wants to merge 5 commits into
developfrom
relay-don-response-caching-improvements

Conversation

@vreff

@vreff vreff commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
  • Adds a pendingRequests cache, such that if a capability call is in-flight while a retry comes in, it is gracefully waited for, rather than retried at the DON-to-DON layer (which would return a terminal error).
  • Adds more logging.
  • Cleans up dead & tautological code.
  • Bumps the default grace window for the execution handler from 5s -> 15s.

@vreff
vreff requested a review from a team as a code owner September 4, 2026 13:17
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

👋 vreff, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@trunk-io

trunk-io Bot commented Sep 4, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@vreff
vreff requested a review from cfal September 4, 2026 13:39
// A retry that arrives while the original execution is still in flight
// waits on it and responds with the owner's result rather than
// re-executing.
pending, err := h.checkOrCreatePendingRequest(key)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if the execution handler lookup times out, then the execution registers? we've inserted a pending entry in checkOrCreatePendingRequest, but the error path doesn't complete or remove it -would a retry find that entry and wait until its own deadline instead of using the now-registered execution handler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like in any error path we don't release the pending request, causing an awkward timeout on every listener. Will fix in a few minutes.

@vreff vreff Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: c0abe74

Also, added a couple of improvements to this PR:

  • Better logging: 96778e0
  • Bump the default grace period for the execution handler: 7e6a5f3. Will follow up to make this one a limit, not hardcoded.

@cl-sonarqube-production

Copy link
Copy Markdown

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