Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix losing batch call errors for individual requests #12127

Merged
merged 7 commits into from
Feb 23, 2024

Conversation

amit-momin
Copy link
Contributor

Issue

  • If an error occurs for an individual request during a batch call, it is populated in the BatchElem.Error field. Documentation
  • The current code loses access to these request specific errors
  • The original BatchElem is not populated with the error because the existing code casts the requests into an array of any in the multinode code then back to BatchElem in the rpc client code.

Solution

  • Introduce a new generic to pass the BatchElem type to the multinode and rpc client interfaces
  • Update the BatchCallContext and BatchCallContextAll methods to directly take the BatchElem as a parameter
  • Remove code from multinode and rpc client that cast the requests from BatchElem to any then back allowing the original request passed in to be populated with individual errors to be used by the caller

Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@amit-momin amit-momin marked this pull request as ready for review February 21, 2024 21:27
@amit-momin amit-momin requested a review from a team as a code owner February 21, 2024 21:27
Copy link
Contributor

@poopoothegorilla poopoothegorilla left a comment

Choose a reason for hiding this comment

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

This looks like it fixes the issue that @dimriou raised

@dimriou dimriou added this pull request to the merge queue Feb 23, 2024
Merged via the queue into develop with commit d10b471 Feb 23, 2024
97 checks passed
@dimriou dimriou deleted the fix/batch-call-errors branch February 23, 2024 15:17
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.

4 participants