Repository navigation
feat(indexer): drain indexing pipelines on planned teardowns #6768
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
fd6b5d4
137846c
ef62d74
3b17597
430bde4
6b0adc1
2ef145e
88d1242
b4b2b60
8e311e7
c007b10
d6588f3
946b518
b615e9f
cd9b6cc
a23df94
90fd1a1
94a28c2
169e7a8
1574496
f77e519
2ed8834
25bcbdc
65f6395
b55659b
25900df
3e58b6e
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 |
|---|---|---|
|
|
@@ -215,9 +215,25 @@ pub struct IndexerConfig { | |
| pub enable_cooperative_indexing: bool, | ||
| #[serde(default = "IndexerConfig::default_cpu_capacity")] | ||
| pub cpu_capacity: CpuCapacity, | ||
| #[serde(default = "IndexerConfig::default_shutdown_drain_timeout")] | ||
| pub shutdown_drain_timeout: HumanDuration, | ||
| } | ||
|
|
||
| impl IndexerConfig { | ||
| /// Returns the shutdown drain timeout, as defined in the environment variable or in | ||
| /// the configuration, in that order (the environment variable overrides the configuration). | ||
| pub fn shutdown_drain_timeout(&self) -> Duration { | ||
| quickwit_common::get_duration_from_env( | ||
| "QW_INDEXER_SHUTDOWN_DRAIN_TIMEOUT", | ||
| Duration::from(self.shutdown_drain_timeout.clone()), | ||
| ) | ||
|
Comment on lines
+226
to
+229
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.
When AGENTS.md reference: AGENTS.md:L19-L19 Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| fn default_shutdown_drain_timeout() -> HumanDuration { | ||
| HumanDuration::try_from("300s".to_string()) | ||
| .expect("`300s` should be a valid human duration") | ||
| } | ||
|
|
||
| fn default_enable_cooperative_indexing() -> bool { | ||
| false | ||
| } | ||
|
|
@@ -265,6 +281,7 @@ impl IndexerConfig { | |
| cpu_capacity: PIPELINE_FULL_CAPACITY * 4u32, | ||
| max_merge_write_throughput: None, | ||
| merge_concurrency: NonZeroUsize::new(3).unwrap(), | ||
| shutdown_drain_timeout: Self::default_shutdown_drain_timeout(), | ||
| }; | ||
| Ok(indexer_config) | ||
| } | ||
|
|
@@ -281,6 +298,7 @@ impl Default for IndexerConfig { | |
| cpu_capacity: Self::default_cpu_capacity(), | ||
| merge_concurrency: Self::default_merge_concurrency(), | ||
| max_merge_write_throughput: None, | ||
| shutdown_drain_timeout: Self::default_shutdown_drain_timeout(), | ||
| } | ||
| } | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.