Revert "feat(sei-db): add flatkv store implementation (#2793)"#2918
Revert "feat(sei-db): add flatkv store implementation (#2793)"#2918blindchaser merged 1 commit intomainfrom
Conversation
This reverts commit 07025b9.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a75cda5e34
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if cfg.WriteMode == config.DualWrite || cfg.WriteMode == config.SplitWrite { | ||
| store.evmCommitter = flatkv.NewCommitStore(homeDir, logger, cfg.FlatKVConfig) | ||
| } | ||
| // TODO: initialize FlatKV store for evmSC when cfg.WriteMode != config.CosmosOnlyWrite |
There was a problem hiding this comment.
Initialize FlatKV for non-cosmos write modes
NewCompositeCommitStore no longer creates an evmCommitter when write_mode is dual_write or split_write, so cs.evmCommitter stays nil for all runtime instances; in split_write, ApplyChangeSets routes EVM changes only to this backend, which means EVM state updates are silently dropped instead of being committed. This causes data loss for any node running migration modes, so startup should either initialize flatkv.NewCommitStore(...) for non-cosmos_only modes or fail fast when those modes are configured.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2918 +/- ##
==========================================
+ Coverage 57.22% 57.32% +0.10%
==========================================
Files 2094 2097 +3
Lines 171956 172767 +811
==========================================
+ Hits 98400 99041 +641
- Misses 64739 64848 +109
- Partials 8817 8878 +61
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| for blockNum, logs := range chunk.logs { | ||
| if blockNum < fromBlock || blockNum > toBlock { | ||
| continue | ||
| } | ||
| for _, lg := range logs { | ||
| if matchLog(lg, crit) { | ||
| logCopy := *lg | ||
| result = append(result, &logCopy) | ||
| } | ||
| } | ||
| } |
Check warning
Code scanning / CodeQL
Iteration over map Warning
| "fmt" | ||
| "log" | ||
| "path/filepath" | ||
| "runtime" |
Check notice
Code scanning / CodeQL
Sensitive package import Note
| go func() { | ||
| for { | ||
| latestVersion := s.latestVersion.Load() | ||
| pruneBeforeBlock := latestVersion - s.config.KeepRecent | ||
| if pruneBeforeBlock > 0 { | ||
| pruned := s.pruneOldFiles(uint64(pruneBeforeBlock)) | ||
| if pruned > 0 && s.log != nil { | ||
| s.log.Info(fmt.Sprintf("Pruned %d parquet file pairs older than block %d", pruned, pruneBeforeBlock)) | ||
| } | ||
| } | ||
|
|
||
| // Add random jitter (up to 50% of base interval) to avoid thundering herd | ||
| jitter := time.Duration(rand.Float64()*float64(pruneIntervalSeconds)*0.5) * time.Second | ||
| sleepDuration := time.Duration(pruneIntervalSeconds)*time.Second + jitter | ||
|
|
||
| select { | ||
| case <-s.pruneStop: | ||
| return | ||
| case <-time.After(sleepDuration): | ||
| // Continue to next iteration | ||
| } | ||
| } | ||
| }() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note
| } | ||
|
|
||
| // Add random jitter (up to 50% of base interval) to avoid thundering herd | ||
| jitter := time.Duration(rand.Float64()*float64(pruneIntervalSeconds)*0.5) * time.Second |
Check notice
Code scanning / CodeQL
Floating point arithmetic Note
| } | ||
|
|
||
| // Add random jitter (up to 50% of base interval) to avoid thundering herd | ||
| jitter := time.Duration(rand.Float64()*float64(pruneIntervalSeconds)*0.5) * time.Second |
Check notice
Code scanning / CodeQL
Floating point arithmetic Note
This reverts commit 07025b9.
Describe your changes and provide context
Testing performed to validate your change