-
Notifications
You must be signed in to change notification settings - Fork 987
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
Some groundwork for pipelining the store #3084
Conversation
a673aa0
to
f3d1b1a
Compare
Two points, which became easier to address after #3085:
|
Yep indeed, that's wrong. We should update the cursor in this case also definitely. |
The problem with this is that writable stores are also constructed in tests - I had an initial go at that, and they are all over the place when it comes to constructing writable stores. But in the tests, the pattern will need to be
I suspect there's some utility we can add to the
I like that - we could change it so that block cursor and ptr are returned from |
Which leaves the question: in terms of this PR, what should change in it? Just remove the commit |
@lutter I'd be fine to merge this with that commit removed, but how does that leave the |
f3d1b1a
to
c58521c
Compare
I just rebased the branch to latest master. Thinking some more about making |
Do you think it's actually feasible to error in |
c58521c
to
97846d6
Compare
We'd still need a map from deployment id to that agent/writable; at the very least, we'd need to keep a |
@lutter Yes, I was thinking of how we could leverage the map to check an invariant that's truly useful. Having two instances of But I'll defer to you if you prefer to keep the current approach which deals with |
That is the last place still using it. With that, it's also clear that MockStore does not need to implement SubgraphStore
That makes it possible to keep the SubgraphStore out of the runtime host altogether and helps clarify that it doesn't need direct store access except for ENS lookups
Right now, it is only a wrapper around WritableStore, but we will evolve it into an agent that manages writing to the database asynchronously. We also stop impelementing the `WritableStore` trait for `WritableStore` since we will need to modify some method signatures.
97846d6
to
1645118
Compare
This PR contains some fairly simple groundwork in preparation of pipelining the
WritableStore
. It might be good to merge that now since it touches things in quite a few places outside the store. Pipelining proper should then mostly happen within the store.The biggest functional change in this PR is that the
WritableAgent
caches the block pointer and cursor in memory rather than getting it from the database.