chore: copy localblocks into livestore module#6808
Merged
javiermolinar merged 8 commits intografana:mainfrom Mar 27, 2026
Merged
chore: copy localblocks into livestore module#6808javiermolinar merged 8 commits intografana:mainfrom
javiermolinar merged 8 commits intografana:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves (duplicates) the ingester’s local block and partition ring helper types into the livestore module, removing modules/livestore’s dependency on modules/ingester for those helpers.
Changes:
- Add
livestore.PartitionRingConfigand updatelivestore.Configto use it. - Add
livestore.LocalBlockand switch reload/search paths to use it instead ofingester.LocalBlock. - Add a restart test ensuring invalid complete blocks are dropped during replay.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/livestore/partition_ring.go | Introduces PartitionRingConfig local to the livestore module. |
| modules/livestore/local_block.go | Introduces LocalBlock wrapper for local backend blocks (search/flush + flushed marker). |
| modules/livestore/config.go | Switches Config.PartitionRing from ingester.PartitionRingConfig to livestore.PartitionRingConfig. |
| modules/livestore/live_store_background.go | Uses livestore.NewLocalBlock during complete-block reload. |
| modules/livestore/instance.go | Stores completed blocks as *livestore.LocalBlock and constructs them via NewLocalBlock. |
| modules/livestore/instance_search.go | Updates type assertions and goroutine signatures to use *livestore.LocalBlock. |
| modules/livestore/instance_search_test.go | Updates test-local types from *ingester.LocalBlock to *livestore.LocalBlock. |
| modules/livestore/live_store_test.go | Adds a test that corrupts a complete block and asserts it’s dropped on restart. |
| CHANGELOG.md | Adds a changelog entry for this user-facing/internal change. |
stoewer
approved these changes
Mar 27, 2026
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.
What this PR does:
As of today Livestore references the localblocks implementation from the ingester module. Since we plan to remove that module soon we can just copy the code into the livestore.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]