-
Notifications
You must be signed in to change notification settings - Fork 11
feat: implement regions #364
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -281,6 +281,19 @@ type Config struct { | |
| // Specify how many tokens can be checked using regular expressions. | ||
| // If zero then there is no limit. | ||
| MaxRegexTokensCheck int `config:"max_regex_tokens_check" default:"0"` | ||
|
|
||
| // Regions configures the proxy to query only remote regions (other seq-proxies via store API). | ||
| // When set, hot_stores, hot_read_stores, write_stores, read_stores must be empty. No bulk; search only. | ||
| Regions struct { | ||
| // UseRegions is whether to use regions or not | ||
| UseRegions bool `config:"use_regions"` | ||
|
Member
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. currently, config looks like that: We repeat I think it would be cleaner to have just: |
||
| // Regions maps region name to store API gRPC address (e.g. "eu" -> "eu-proxy:9004"). | ||
| Regions map[string]string `config:"regions"` | ||
| // MaxConcurrent limits how many regions are queried in parallel per search (0 = no limit). | ||
| MaxConcurrent int `config:"max_concurrent" default:"0"` | ||
|
Member
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. I think it's hard to tell what |
||
| // MaxRegionsPerRequest is the maximum number of regions a client can specify in one search request (e.g. 5). | ||
| MaxRegionsPerRequest int `config:"max_regions_per_request" default:"5"` | ||
| } `config:"regions"` | ||
| } `config:"experimental"` | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,4 +17,6 @@ var ( | |
| MaxRegexTokensCheck int | ||
|
|
||
| FailPartialResponse = false | ||
|
|
||
| UseRegions = false | ||
| ) | ||
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.
nit: Even with proxy setup I still can configure hot_stores:
However, I can't use them:
I guess, we could validate config that
hot_storescan't be set if regions are enabled.