-
Notifications
You must be signed in to change notification settings - Fork 861
[STO-310] Parquet receiptdb option #2740
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2740 +/- ##
==========================================
+ Coverage 47.10% 56.42% +9.31%
==========================================
Files 1939 2014 +75
Lines 159389 165834 +6445
==========================================
+ Hits 75086 93565 +18479
+ Misses 77799 64065 -13734
- Partials 6504 8204 +1700
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
34a1f18 to
d0eba45
Compare
| go func() { | ||
| for { | ||
| latestVersion := s.latestVersion.Load() | ||
| pruneBeforeBlock := latestVersion - s.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 jitter to avoid thundering herd | ||
| jitter := time.Duration(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 jitter to avoid thundering herd | ||
| jitter := time.Duration(float64(pruneIntervalSeconds)*0.5) * time.Second |
Check notice
Code scanning / CodeQL
Floating point arithmetic Note
The conversions are safe because: - begin/end are validated positive block heights - toBlock is a block height fitting in int64 - blockHeight and txIdx are validated non-negative Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Describe your changes and provide context
Testing performed to validate your change
unit tests, state sync on loadtest cluster