feat: protect parallel boundaries and improve Preset refresh reliability - #243
Merged
Merged
Conversation
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.
Description
Parallel searches can miss keywords spanning chunk boundaries, and a stale Preset reader currently waits behind a reload tied to the first caller's context. This change adds opt-in automatic boundary protection and lets each waiting request cancel independently.
ParallelOptions.AutoOverlap, using the loaded engine's longest keyword rune length to extend non-overlapping base chunks. Filter matches by their owned start positions, including keywords longer thanChunkSize; preserve parallel ordering, original rune positions, and one engine load per call. Copy caller options before normalization.PresetReloadFailuresandPresetPollFailures. Avoid restarting a slow reload on every poll. Update API snapshots, audit records, examples, operating guidance, and release notes.Defaults and Redis schema remain unchanged. This is intended for the next minor release; no migration is required.
Type of Change
Checklist
make test)make vet)make lint)make build)Validation
-race. Real Redis benchmark smoke run; timings are not claimed as performance comparisons.Polling remains disabled by default. Its interval is not a freshness guarantee during outages, and the retained previous engine is not a fallback for failed reload requests.