feat: add checkpointing into the backfill so we can resume from the l…#519
feat: add checkpointing into the backfill so we can resume from the l…#519knrc wants to merge 2 commits intosecuresign:mainfrom
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #519 +/- ##
=======================================
Coverage ? 25.66%
=======================================
Files ? 191
Lines ? 19783
Branches ? 0
=======================================
Hits ? 5078
Misses ? 13938
Partials ? 767
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ast completed, contiguous index Signed-off-by: Kevin Conner <kev.conner@gmail.com>
8dd2a54 to
293d061
Compare
… and prune docker volumes between the harness tests. Signed-off-by: Kevin Conner <kev.conner@gmail.com>
User description
…ast completed, contiguous index
PR Type
Enhancement
Description
Add checkpointing support for resuming interrupted backfills
Implement checkpoint persistence for both Redis and MySQL backends
Track last completed contiguous index to enable safe resumption
Add CLI flags for checkpoint control and interval configuration
Refactor error handling to fail fast on critical errors
Add comprehensive test scenarios for checkpoint functionality
Diagram Walkthrough
flowchart LR A["Backfill Start"] --> B{"Checkpoint<br/>Exists?"} B -->|Yes| C["Resume from<br/>Last Index"] B -->|No| D["Start from<br/>--start"] C --> E["Process Entries"] D --> E E --> F["Track Completed<br/>Indices"] F --> G{"Interval<br/>Reached?"} G -->|Yes| H["Save Checkpoint"] G -->|No| F H --> I{"More<br/>Entries?"} I -->|Yes| E I -->|No| J["Final Checkpoint<br/>Save"] J --> K["Complete"]File Walkthrough
main.go
Implement checkpointing with resume capabilitycmd/backfill-index/main.go
checkpoint table
clients
checkpoint-key
resumption logic
completed entry
intervals
backfill-test.sh
Add checkpoint testing scenarios and helperstests/backfill-test.sh
test scenarios
and MySQL
and reset functionality
entries