Skip to content

fix(stats): backport checkpoint change filtering to 4.2 - #29338

Merged
XuPeng-SH merged 2 commits into
matrixorigin:4.2-devfrom
gouhongshen:codex/fix-changed-table-window-4.2
Sep 24, 2026
Merged

XuPeng-SH merged 2 commits into
matrixorigin:4.2-devfrom
gouhongshen:codex/fix-changed-table-window-4.2

Conversation

@gouhongshen

@gouhongshen gouhongshen commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • BUG

Which issue(s) this PR fixes:

issue #29339

What this PR does / why we need it:

Backport of #29337 to 4.2-dev.

CollectChanged currently compares the checkpoint index row's end with start instead of the requested lower bound from. Valid historical rows therefore remain in every collection result and can repeatedly schedule old table IDs for statistics recalculation.

Filter index ranges by overlap with [from, to], preserving the existing invalid-range and upper-bound behavior. Add regression cases for historical, overlapping, boundary, future, and invalid ranges, plus a handler-level test that exercises the checkpoint index path. CheckChanged behavior is unchanged.

Validation on 4.2-dev: make cgo NATIVE_BUILD_JOBS=8; mo-cgo-test -count=1 -coverprofile=/tmp/matrixone-changed-table-window-4.2.cover -run '^(TestTableIDRangeIntersectsWindow|TestHandleGetChangedTableListCollectChangedUsesIndexWindow|TestTryGetChangedListFromTableIDBatchReadsCompleteIndex)$' ./pkg/vm/engine/tae/rpc; handler test also passed with -count=10; git diff --check.

@gouhongshen
gouhongshen marked this pull request as ready for review September 24, 2026 09:19
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed exact 4.2-dev head d52078a. No blocking findings. The overlap predicate excludes checkpoint-index rows ending before the requested lower bound while preserving inclusive endpoint, invalid-range, and upper-bound behavior. CheckChanged, checkpoint fallback, and serialized formats remain unchanged. Reviewed all changed hunks and the index-to-handler closure. Reused focused regression evidence and successful exact-head Linux UT, SCA, build, coverage, and distributed BVT checks. This is a targeted bug-fix backport; no separate design gate.

This branch was previously deployed

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

Labels

kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants