Skip to content

[Bug]: CollectChanged returns historical checkpoint table IDs outside requested window #29339

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main and 4.2-dev

Commit ID

d7d940e93b (main); 5c79c3b202 (4.2-dev)

Other Environment Information

Observed while investigating mo_table_stats CPU load on IDC QA. The source-level condition is present on both branches.

Actual Behavior

HandleGetChangedTableList uses checkpoint table-ID index ranges for CollectChanged. The lower-bound condition checks end < start, which only rejects malformed ranges. A valid historical range ending before the requested from therefore passes and its table ID can be returned on every subsequent collection window.

Expected Behavior

Return a table ID only if its valid checkpoint range intersects the requested [from, to] window. Do not change the separate CheckChanged semantics.

Steps to Reproduce

Use from=100, to=200, and an indexed table-ID range start=10, end=99. The current CollectChanged predicate accepts the range although it is wholly historical. A range ending at from, spanning the window, or starting at to should remain accepted.

Additional information

The checkpoint table-ID index retains older rows, so this predicate can repeatedly select stale table IDs for mo_table_stats recalculation. The fix is limited to the CollectChanged time-window filter and regression tests.

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions