Skip to content

use macro with cache to load env#6618

Open
PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:reduce_logs
Open

use macro with cache to load env#6618
PSeitz wants to merge 1 commit into
quickwit-oss:mainfrom
PSeitz:reduce_logs

Conversation

@PSeitz

@PSeitz PSeitz commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

switch more usage to get_from_env_cached to enforce they are read (and logged) only once

@PSeitz
PSeitz requested a review from a team as a code owner July 20, 2026 07:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4bbb9bca3d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

return Ok(None);
}
if !quickwit_common::get_bool_from_env("QW_ENABLE_DATAFUSION_ENDPOINT", false) {
if !quickwit_common::get_bool_from_env_cached!("QW_ENABLE_DATAFUSION_ENDPOINT", false) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Don't cache the DataFusion enable flag globally

When the datafusion feature is tested in-process, many ClusterSandboxBuilder::build_and_start* tests can start a searcher before metrics_distributed_tests sets QW_ENABLE_DATAFUSION_ENDPOINT=true; this new OnceLock then caches false for the whole test process, so the later DataFusion sandbox never mounts the gRPC service and its client calls fail. This toggle should remain evaluated at node startup (or be made explicitly test-scoped) rather than using a process-wide cached read.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant