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.
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
Incremental solvable orders cache update #2923
Incremental solvable orders cache update #2923
Changes from 16 commits
bee782a
0b8c97d
22abb5e
ab2f8cb
e6a4a64
6984418
ac2f36a
efb7389
c185443
3a12bac
5786d82
e7165f6
d630e9e
fe50a81
350191f
a2262cb
298e31a
cea8850
8eb3e55
c883090
53969d5
3dc9243
2d0813b
6d012c5
8551f81
efc0d58
c173a33
d8b12a4
a5a0769
25faa4e
d34cc12
8868079
1d2efee
b5a869e
b2a04f9
b06e2a9
396fc43
157e6c0
f93f2f6
902687b
35cd677
8ca4434
945b7cc
e9d5463
de7324c
9e05929
c1a5cfa
11d9db5
85c9d16
9035848
a0f1d9e
b70a134
5b9d146
62907ed
6e61210
7004db3
c20b156
8eafd2b
a9262dd
065bed0
0e51662
1720b1c
772520b
157c126
779d6b9
1d3b179
65a630a
cd54bc4
3d7e0d4
6dd8299
79a989a
57d46fb
2604f12
c16ec11
2740db0
276f1b5
f1951c9
4b91878
c494446
2cc9125
ab0d5d5
ef721b5
86c3f45
fd4d039
73976cf
86cb105
b6c5538
6baaf2c
6519810
0c8eeee
4cbf63f
a10b4e3
7176646
1afe8ed
dd8b362
2c8a45c
ea84a28
72d8b7a
55eb516
459bf87
fb8dad3
db3a1b5
4376b22
bd95564
b24d9cc
1f94ebe
c724e35
b012d45
9438fa0
ac250e7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Couldn't this
await
be parallelized with thelatest_settlement_block()
one? 🤔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.
No, since there is an opened transaction.
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 don't understand. Are you saying that in order to get the quote, we need to first read the latest settlement block?
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.
There is an opened tx which doesn't allow executing SQL queries in parallel:
services/crates/autopilot/src/infra/persistence/mod.rs
Lines 400 to 406 in a10b4e3
We should fetch all the data using a single DB snapshot even for quotes since there is a logic of updating them based on the onchain data:
services/crates/autopilot/src/database/onchain_order_events.rs
Lines 329 to 342 in e7de6bf
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.
In that case, shouldn't we use the same
tx
for fetching the quote?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.
Oh, right. Looks like I reverted the wrong change during one of the reworks. Thanks!