fix: joinset result ordering#1214
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (2)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR refactors concurrent account fetching in the ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@magicblock-rpc-client/src/lib.rs`:
- Around line 327-337: Add a regression test that exercises the chunked fetch
path (the code that maps pubkeys.chunks(max_per_fetch) into futures and awaits
try_join_all) to verify out-of-order completion still preserves input order:
implement a test (e.g., test_out_of_order_chunk_completion) that builds a
mock/replaceable RPC client used by the method under test and arranges the
per-chunk futures so a later chunk completes before an earlier chunk (use
controllable primitives like oneshot channels, delays, or a mock that resolves
in reversed order), call the function that invokes
self.client.get_multiple_accounts_with_config for chunks, and assert the
returned Vec<Option<Account>> aligns with the original pubkeys ordering despite
the reversed completion order.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 166d5374-c6da-48d3-805b-e814176009e0
⛔ Files ignored due to path filters (2)
Cargo.lockis excluded by!**/*.locktest-integration/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
magicblock-rpc-client/Cargo.tomlmagicblock-rpc-client/src/lib.rs
# Conflicts: # Cargo.lock
Summary
JoinSet returns results in completion order not in scheduled order, as result with 2 chunks the returns acc data could correspond to different pubkey.
Breaking Changes
Test Plan
Summary by CodeRabbit