-
Notifications
You must be signed in to change notification settings - Fork 454
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
[db] Add an option to use db writes in index mode #1596
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8f31691
[db] Add an option to use db writes in index mode
arnikola ef8059e
Update mock
arnikola 145ad6d
PR response; updating truncation options
arnikola 28c0828
Refactoring options, plumbing config to options
arnikola e6c6c55
PR response
arnikola ff64c38
Update mocks
arnikola c001f9e
Fixing integration tests
arnikola b146607
Merge branch 'master' into arnikola/use-as-index
arnikola c925364
Fix break to index options
arnikola 22d699d
Merge branch 'master' into arnikola/use-as-index
arnikola File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -342,7 +342,6 @@ func Run(runOpts RunOptions) { | |
CacheRegexp: plCacheConfig.CacheRegexpOrDefault(), | ||
CacheTerms: plCacheConfig.CacheTermsOrDefault(), | ||
}) | ||
opts = opts.SetIndexOptions(indexOpts) | ||
|
||
if tick := cfg.Tick; tick != nil { | ||
runtimeOpts = runtimeOpts. | ||
|
@@ -1281,6 +1280,17 @@ func withEncodingAndPoolingOptions( | |
aggregateQueryResultsPool := index.NewAggregateResultsPool( | ||
poolOptions(policy.IndexResultsPool, scope.SubScope("index-aggregate-results-pool"))) | ||
|
||
// Set value transformation options. | ||
opts = opts.SetTruncateType(cfg.Transforms.TruncateBy) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Maybe move this above the |
||
forcedValue := cfg.Transforms.ForcedValue | ||
if forcedValue != nil { | ||
opts = opts.SetWriteTransformOptions(series.WriteTransformOptions{ | ||
ForceValueEnabled: true, | ||
ForceValue: *forcedValue, | ||
}) | ||
} | ||
|
||
// Set index options. | ||
indexOpts := opts.IndexOptions(). | ||
SetInstrumentOptions(iopts). | ||
SetMemSegmentOptions( | ||
|
@@ -1297,7 +1307,9 @@ func withEncodingAndPoolingOptions( | |
SetIdentifierPool(identifierPool). | ||
SetCheckedBytesPool(bytesPool). | ||
SetQueryResultsPool(queryResultsPool). | ||
SetAggregateResultsPool(aggregateQueryResultsPool) | ||
SetAggregateResultsPool(aggregateQueryResultsPool). | ||
SetForwardIndexProbability(cfg.Index.ForwardIndexProbability). | ||
SetForwardIndexThreshold(cfg.Index.ForwardIndexThreshold) | ||
|
||
queryResultsPool.Init(func() index.QueryResults { | ||
// NB(r): Need to initialize after setting the index opts so | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops will revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍