-
Notifications
You must be signed in to change notification settings - Fork 169
driver: parallelize unsupported order detection #4347
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
Open
metalurgical
wants to merge
29
commits into
cowprotocol:main
Choose a base branch
from
metalurgical:fix_chore_3516
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+720
−102
Open
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
cc93ca1
driver: parallel unsupported order detection
metalurgical 889f437
driver(tests): unsupported_order_uids test cases
metalurgical ae060d2
lint: run cargo fmt
metalurgical c5cf81d
refactor
metalurgical 8ae2e9b
refactor: implement trait to cover simulation branch in test
metalurgical 144212f
fix: lint
metalurgical 8375c44
fix: lint
metalurgical 13d0be9
Merge branch 'main' into fix_chore_3516
metalurgical 5ad8f6b
update: use tokio::spawn to schedule filtering and liquidity fetching…
metalurgical b56b2b9
review: address comments
metalurgical 6045c8b
refactor: simplify test
metalurgical ede7489
review: address additional review comments
metalurgical efc6d90
fix: comment
metalurgical e01df58
fix: comment
metalurgical 9dac353
Merge branch 'main' into fix_chore_3516
metalurgical 5707a99
Merge branch 'main' into fix_chore_3516
metalurgical c06963a
refactor: separate concerns in without_unsupported_orders
metalurgical 60e766f
update
metalurgical f41f0d9
Merge branch 'main' into fix_chore_3516
metalurgical e954f2c
update: flashloan test for quote changes
metalurgical 035b6bf
fix: flashloan quote test names
metalurgical 9aa8acc
Merge branch 'main' into fix_chore_3516
metalurgical e17a6ae
Merge branch 'main' into fix_chore_3516
metalurgical 405dfc9
Merge branch 'main' into fix_chore_3516
metalurgical be82231
Merge branch 'main' into fix_chore_3516
metalurgical e9ce935
Merge branch 'main' into fix_chore_3516
metalurgical b6293f1
Merge branch 'main' into fix_chore_3516
metalurgical 0e22fb0
Merge branch 'main' into fix_chore_3516
metalurgical fcc1f50
Merge branch 'main' into fix_chore_3516
metalurgical File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tokio::spawnreturns detachedJoinHandles.tokio::join!awaits them, but if the outersolve()future is dropped (e.g. client disconnect, overload shed), the spawned tasks keep running to completion. The previous inline tokio::join!(async { … }, future) would have been cancelled with the parent.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see your point. Though this behavior is not new here, it already exists with
run_blocking_with_timer.I would like to suggest that you have a look at #4379. The same concept there can be used for this as well, just couple it with a scopeguard. This is also probably better implemented there as well, else it is duplicating efforts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this be solveable by simply using a cancellationtoken + dropguard?
The PR you're pointing to is huge and the scope/steps need to be discussed
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is it.
The PR I am pointing to already has the cancellation token threaded through. It appears large but much of it is tests and plumbing. Did subsequently open an issue for it, #4380. So it just needs the drop guard added to it (and an patched in here) then the above behavior mentioned here will be handled as well.
Happy to discuss scope and steps further.