Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: metrics can't search parquet in wal#8896

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hengfeiyang merged 11 commits intomainfromfeat/metrics-cache
Oct 29, 2025
Merged

Conversation

@hengfeiyang
Copy link
Contributor

@hengfeiyanghengfeiyang commentedOct 28, 2025
edited
Loading

  • fixed: can't search parquet in wal for metrics
  • feat: supportwindow.use_cache=false for metrics to skip query cache

greptile-apps[bot] reacted with thumbs up emoji
@github-actionsgithub-actionsbot added the ☢️ BugSomething isn't working labelOct 28, 2025
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

Copy link
Contributor

@greptile-appsgreptile-appsbot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR fixes metrics parquet file searching in WAL by properly handling partition time levels (daily vs hourly), and refactors cache control from negativeno_cache to positiveuse_cache semantics.

Key Changes:

  • Fixed WAL parquet search to respectpartition_time_level setting, correctly aligning time ranges to either daily or hourly boundaries based on stream configuration
  • Refactored cache control fromno_cache touse_cache throughout the codebase for clearer intent
  • Added cache update logic that allows queries with caching disabled to still update existing cache entries
  • Implemented frontend support forwindow.use_cache override to control query caching behavior during development/debugging

Issue Found:

  • Comment on line 100 insrc/service/promql/search/mod.rs incorrectly describes the logic (says "use_cache is true" when it should say "use_cache is false")

Confidence Score: 4/5

  • This PR is safe to merge with one minor documentation fix needed
  • The changes are well-structured and address the stated issues. The partition time level fix is correct and properly threaded through the codebase. The cache semantics refactor is consistent across all files. Only issue is an incorrect comment that doesn't affect functionality
  • src/service/promql/search/mod.rs needs comment correction on line 100

Important Files Changed

File Analysis

FilenameScoreOverview
src/service/search/grpc/wal.rs5/5Addedpartition_time_level parameter to correctly handle daily vs hourly partitioning when searching parquet files in WAL for metrics
src/service/promql/search/mod.rs4/5Changed fromno_cache touse_cache semantics, added cache update logic; comment on line 100 needs correction
src/service/promql/search/cache/mod.rs5/5Addedupdate parameter toset() function to control whether cache should be updated even when already covered
web/src/services/search.ts5/5Added support forwindow.use_cache override in frontend to control query caching behavior

Sequence Diagram

sequenceDiagram    participant Client as Web Client    participant HTTP as HTTP Handler    participant Search as PromQL Search    participant Cache as Cache Service    participant Cluster as Cluster RPC    participant WAL as WAL Search    participant Parquet as Parquet Files    Client->>HTTP: query_range(query, use_cache)    HTTP->>Search: search_in_cluster(req)        Note over Search: Check if cache_disabled<br/>(!use_cache || !cache_enabled)        alt Cache enabled and use_cache=true        Search->>Cache: get(query, start, end)        Cache-->>Search: cached data (if exists)    end        Search->>Cluster: distribute query to nodes    Cluster->>WAL: search_parquet(query)        Note over WAL: Get partition_time_level<br/>from stream settings        alt Daily Partitioning        WAL->>WAL: Align to DAY_MICRO_SECS    else Hourly Partitioning        WAL->>WAL: Align to HOUR_MICRO_SECS    end        WAL->>Parquet: scan files in time range    Parquet-->>WAL: record batches    WAL-->>Cluster: results    Cluster-->>Search: aggregated results        alt Cache enabled        Search->>Cache: set(query, results, update=!cache_disabled)        Note over Cache: Update cache if needed    end        Search-->>HTTP: query results    HTTP-->>Client: response
Loading

12 files reviewed, 1 comment

Edit Code Review Agent Settings |Greptile

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:41be0ab

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed182168013192%2m 39s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:41be0ab

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed121110010191%2m 32s

View Detailed Results

@testdino-playwright-reporter

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed88000100%2m 36s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:60b3cac

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed365339019793%4m 38s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:5bf18a8

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed365343019394%4m 38s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:ddb1cf9

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed365343019394%4m 40s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:ddb1cf9

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed365343019394%4m 39s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:yaga-simha | Branch:feat/metrics-cache | Commit:2eaa7ff

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed365344019294%5m 2s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:520544a

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed366344019394%4m 39s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:520544a

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed366345019294%4m 39s

View Detailed Results

@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:hengfeiyang | Branch:feat/metrics-cache | Commit:8bd579c

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed366345019294%4m 39s

View Detailed Results

@hengfeiyanghengfeiyang merged commitf56b2b8 intomainOct 29, 2025
12 of 15 checks passed
@hengfeiyanghengfeiyang deleted the feat/metrics-cache branchOctober 29, 2025 05:37
@testdino-playwright-reporter

⚠️ Test Run Unstable


Author:openobserve | Branch:feat/metrics-cache | Commit:8ed5061

Testdino Test Results

StatusTotalPassedFailedSkippedFlakyPass RateDuration
All tests passed366344019394%4m 38s

View Detailed Results

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

Reviewers

@haohuaijinhaohuaijinhaohuaijin approved these changes

+2 more reviewers

@greptile-appsgreptile-apps[bot]greptile-apps[bot] left review comments

@yaga-simhayaga-simhayaga-simha approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

☢️ BugSomething isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@hengfeiyang@haohuaijin@yaga-simha

[8]ページ先頭

©2009-2025 Movatter.jp