-
Notifications
You must be signed in to change notification settings - Fork 599
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
storage: maintain L0 SST index in compute nodes #4072
Comments
Note that wait_epoch will now need to download LocalL0SSTs. Need to take special care of the batch read process. |
This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned. |
@Li0k Can you help port this to the new state store implementation? |
Hi, folks, any updates on this? |
|
We have a new RFC proposed. I will remove this issue from milestone and re-add it when the RFC is finialized. |
ok while I still think flat is better than map for |
Background
In our system, the reader of the internal states is always the writer of the state. Currently, the storage LSM read path of internal states is unaware of this assumption. Due to the fact that L0 SSTs can overlap with each other and we use key range to filter SSTs, CN may end up fetching unused L0 SSTs on reads:
To solve this problem, we need to maintain some kind of L0 SST index to leverage the "reader of the internal states is always the writer of the state" assumption to improve L0 SST filtering.
Solution
After discussion with @skyzh, @st1page , @wenym1 and @Li0k, we have come up with some ideas:
LocalL0SSTs
.LocalL0SSTs
and L0 SSTs in HummockVersion" + L1-N SSTs in HummockVersion to construct a local version for reads. Existing SST filtering logic still applies.LocalL0SSTs
by removing the deleted SSTs (due to compaction). Thanks to incremental version fetch, we can easily identify the deleted SSTs.Under this solution, we will only use the full list of L0 SSTs in HummockVersion when
LocalL0SSTs
is absent: 1) failover, 2) batch query (if batch reader is not co-scheduled with streaming executors)Further optimizations
LocalL0SSTs
to reduce read amplification on L0 SSTs. That means CN needs to trigger L0->L0 compaction providingLocalL0SSTs
information to compaction manager. Also, I am not sure how this can be integrated with the sub-level design. Need further investigation.LocalL0SSTs
data structure: flat or map?The text was updated successfully, but these errors were encountered: