Closed
Conversation
+ and store additional flag HAS_STATE_PARTS to block handle
- add HAS_STATE_PARTS flag to existing blocks in the `block_handles`
🧪 Network TestsTo run network tests for this PR, use: gh workflow run network-tests.yml -f pr_number=946Available test options:
Test types: Results will be posted as workflow runs in the Actions tab. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #946 +/- ##
==========================================
- Coverage 46.25% 46.10% -0.16%
==========================================
Files 335 335
Lines 60584 61340 +756
Branches 60584 61340 +756
==========================================
+ Hits 28026 28283 +257
- Misses 31112 31591 +479
- Partials 1446 1466 +20 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e01f7f5 to
804fc23
Compare
+ do not double store partition subtree root cell in the main storage
804fc23 to
c303ac7
Compare
Member
Author
|
included in #983 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RATIONALE
Support local state partitions - shard accounts cells tree is split into partitions by shards at the configured
split_depth. The top of the state tree is stored in the main cells db, and partitions subtrees are stored each in separate physical databases that can be placed on separate disks.Pull Request Checklist
NODE CONFIGURATION MODEL CHANGES
[Yes]
Added
core_storage.state_partssplit_depth: 0- no partitions used;Default value is
state_parts: nullthat means no partitions.BLOCKCHAIN CONFIGURATION MODEL CHANGES
[None]
COMPATIBILITY
Affected features:
Fully compatible.
State will be saved with partitions if they are specified in config. If state was saved with partitions it will be read with partitions. If it was saved without partitions (e.g. before update) it will be read without.
Partitions map
{key - cell hash: value - shard prefix}will be saved toCellsDB.shard_statesright afterroot cell hash. If no partitions used nothing will be added toShardStatesvalue. So existing values inShardStatestable will be treated as "no partitions used".A new flag
HAS_STATE_PARTS = 1 << 13added to theBlockHandlebit flags. It means that no partitions were used / or all required state partitions were successfully stored in separate storages. NowBlockHandle.has_state()returnstrueonly when both new flag and old oneHAS_STATE_MAIN = 1 << 3are set. The migration script (0.0.4 -> 0.0.5) setHAS_STATE_PARTSfor all existing block handles.Manual compatibility tests were passed:
core_storage.state_parts = nullor remove param from configfeat/split-state-storagebarch version.temp/config1.json.temp/config1.jsonSPECIAL DEPLOYMENT ACTIONS
[Not Required]
Without additional changes in the node config it works with a single partition without split.
PERFORMANCE IMPACT
[Expected impact]
TESTS
Unit Tests
[No coverage]
Network Tests
[No coverage]
Manual Tests
Performance testing:
(metrics are in the PERFORMANCE IMPACT block)