driver: parallel unsupported order detection#4347
Open
metalurgical wants to merge 8 commits intocowprotocol:mainfrom
Open
driver: parallel unsupported order detection#4347metalurgical wants to merge 8 commits intocowprotocol:mainfrom
metalurgical wants to merge 8 commits intocowprotocol:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the competition logic to parallelize unsupported order detection by updating the risk detector API to return a set of UIDs instead of modifying the auction in place. A critical logic error was identified in the new unsupported_order_uids method where orders flagged as unsupported by metrics are filtered out of the processing loop but never added to the removal set, effectively bypassing the intended filtering logic.
Author
|
@jmg-duarte This is minimal, easily reviewable and I think in line with what is expected for resolving the linked issue. Just finishing off what I started. |
Make unsupported order detection read-only and execute it in parallel with sorting and data fetching. Apply filtering after update_orders to preserve existing ordering.
16e3345 to
dcfb3b8
Compare
…ices into fix_chore_3516
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.
Description
Make unsupported order detection read-only and execute it in parallel with sorting and data fetching. Apply filtering after update_orders to preserve existing ordering.
Changes
filter_unsupported_orders_in_auctionwithunsupported_order_uids(&[Order]) -> HashSet<Uid>filter_unsupported_orders_in_auctionwithout_unsupported_orderssolve()unsupported_order_uidsandretainunsupported_order_uidsHow to test
cargo test -p driver
Related Issues
Fixes #3516, follow up PR to #4309 and taking into account #4329