Remove DBCol::ChunkPerHeightShard #7671
Merged
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.
This column is only used by ShardsManager to reject an incoming partial chunk. Previously, the column is written in two ways:
This PR moves the mapping into memory. That means that upon a restart we will have an empty mapping. This should be OK: consider two nodes, one running the old version and one running the in-memory version; since the old version's mapping is a superset of the new version's in-memory mapping, there are two possible cases when the two nodes obtain different lookup results:
This PR is motivated by the ShardsManager refactoring to move it out to its own actor; to that end we need to split the ChainStore because the Client owns the mutable ChainStore. Since we decided to keep chunk-persisting writes on the Client side, the ShardsManager side's only mutation right now is this ChunkPerHeightShard column. Removing this column means the ShardsManager will not need any store mutations which makes the split much easier.