Repository navigation
Conversation
Lets a PostingsList/PostingsIterator implementation opt into segment-merge support and pooled reuse without changing the base PostingsList/PostingsIterator contract, so existing implementations (older zapx major versions) keep compiling unchanged.
Member
Author
|
Putting this off for a future release -- the zapx side (interface-only merge + pooling) is being reverted to the single PostingsList/PostingsIterator implementation. Closing rather than merging. |
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.
Summary
Part of the bitpack-simd effort (zapx blevesearch/zapx#447, bleve companion PR): adds three optional capability interfaces, following the existing
OptimizablePostingsIteratorpattern rather than changing the basePostingsList/PostingsIteratorcontracts.MergeablePostingsList(RawDocFreq() uint64,HasLocs() bool) andMergeablePostingsIterator(NextWithLocBytes(...)) let a segment-merge path depend on published interfaces instead of a package-private bridge.Releasable(Release()) lets aPostingsList/PostingsIteratorvalue opt into pooled reuse, replacing prealloc-passing as the primary reuse mechanism for implementations that choose to support it.These are additive and optional by design: bleve unconditionally registers zapx v11-v17 as segment plugins, none of which implement these methods, so adding them as required methods on the base interfaces would have broken bleve's build against six already-released modules. Checking via type assertion (the same idiom bleve's
optimize.goalready uses forOptimizablePostingsIterator) avoids that entirely.Test plan
go build ./...,go vet ./...clean