Composite State Store part 4: Dual-write path implementation#2757
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
| for version, evmChanges := range evmChangesByVersion { | ||
| if err := s.evmStore.ApplyChangesetParallel(version, evmChanges); err != nil { | ||
| s.logger.Error("failed to raw import EVM data", "version", version, "error", err) | ||
| } | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map
| go func() { | ||
| defer wg.Done() | ||
| cosmosErr = s.cosmosStore.ApplyChangesetSync(version, changesets) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
| go func() { | ||
| defer wg.Done() | ||
| evmErr = s.evmStore.ApplyChangesetParallel(version, evmChanges) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
| go func() { | ||
| defer wg.Done() | ||
| cosmosErr = s.cosmosStore.ApplyChangesetAsync(version, changesets) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
| go func() { | ||
| defer wg.Done() | ||
| evmErr = s.evmStore.ApplyChangesetParallel(version, evmChanges) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
| go func() { | ||
| defer wg.Done() | ||
| cosmosErr = s.cosmosStore.Import(version, cosmosCh) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
| go func() { | ||
| defer wg.Done() | ||
| cosmosErr = s.cosmosStore.RawImport(cosmosCh) | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine
b437822 to
f5ac4df
Compare
90a80ae to
64dae4e
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/composite-ss-read-path #2757 +/- ##
==================================================================
+ Coverage 47.80% 47.82% +0.02%
==================================================================
Files 357 357
Lines 34697 34697
==================================================================
+ Hits 16587 16594 +7
+ Misses 16533 16525 -8
- Partials 1577 1578 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
64dae4e to
e732402
Compare
f5ac4df to
2905e61
Compare
2905e61 to
cbe891a
Compare
e732402 to
42e19d3
Compare
| func (s *CompositeStateStore) ApplyChangesetSync(version int64, changesets []*proto.NamedChangeSet) error { | ||
| // TODO: Add dual-write to EVM_SS in next PR | ||
| return s.cosmosStore.ApplyChangesetSync(version, changesets) | ||
| // Fast path: if no EVM store, just apply to Cosmos |
There was a problem hiding this comment.
We don't always wanna dual write, I feel it's better to have this controlled by a config or write mode in the future.
There was a problem hiding this comment.
Actually it might be fine to keep the current logic, ignore the previous comment, we can still have various configs for read and write strategy/mode, which would determine whether we set the store to nil or not.
There was a problem hiding this comment.
Discussed this, I can add this in after your PR with the writeMode goes in
cbe891a to
a05c51d
Compare
42e19d3 to
4084fe1
Compare
9f95173 to
c43d65d
Compare
4055a6d to
ae9502c
Compare
c43d65d to
1a93e59
Compare
ca81638 to
8efe6df
Compare
8e74734 to
f391eac
Compare
bca19d0 to
b3b7cd4
Compare
ba26486 to
d7bca53
Compare
84547fe to
795dce9
Compare
eb51830 to
8e4dc3a
Compare
795dce9 to
c095ad2
Compare
Describe your changes and provide context
Testing performed to validate your change