Skip to content

lib/logstorage: fix week_range[Sun,Sun] not matching rows on Sunday in filter pipe#1336

Open
cuongleqq wants to merge 2 commits into
VictoriaMetrics:masterfrom
cuongleqq:fix-week-range-sunday-pipe-filter
Open

lib/logstorage: fix week_range[Sun,Sun] not matching rows on Sunday in filter pipe#1336
cuongleqq wants to merge 2 commits into
VictoriaMetrics:masterfrom
cuongleqq:fix-week-range-sunday-pipe-filter

Conversation

@cuongleqq
Copy link
Copy Markdown
Contributor

This changes the weekday range check for week_range in the filter pipe path which uses blockResult.

The old code set the bitmap to 0 if endDay < Monday which missed the case of [Sun,Sun]. So I fixed the condition to endDay < Sunday.

Fixes #1335

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Copy Markdown
Member

@vadimalekseev vadimalekseev left a comment

Choose a reason for hiding this comment

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

LGTM!

Note to core contributors: I think it would be beneficial for all unit filter tests if testFilterMatchForStorage verified that any data searched via applyToBlockSearch is also matched by applyToBlockResult. If this functionality were implemented, the test would have caught this.

@func25 func25 added the bug Something isn't working label Apr 21, 2026
Signed-off-by: Cuong Le <cuongleqq@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

week_range[Sun,Sun] doesn't match rows on Sunday inside filter pipe

3 participants