Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 3b5b7cc against current main 7396d7d.
The boundary diagnosis is correct. In the linked recurrence run 29990725328/job/89152709952, the forced ICKP completed with entry LSN 8 and WAL checkpointed LSN 8, then the old generic waiter captured a newer global watermark of 9 and timed out with target LSN: 9, checkpointed LSN: 8, pending LSN count: 1. That newer LSN is outside the forced checkpoint's fixed boundary. Checking finished entry + end >= requestedTS + WAL checkpointed >= entry.LSN therefore preserves the meaningful contract instead of merely deleting coverage.
I am requesting changes for two closure gaps in this test-only fix:
-
Add a deterministic regression for the exact boundary being fixed. The current workload does not intentionally create and hold a post-request WAL LSN, so all new runs may pass without ever exercising
entry.LSN < current WAL watermark. After a forced entry is fixed, deliberately create a later committed LSN while preventing a new checkpoint from covering it (for example, temporarily disable checkpoint execution), then assert all of: the forced entry LSN is non-zero, WAL checkpointed covers that entry LSN, current watermark is greater, and a newer pending LSN remains. This proves the targeted condition succeeds in the state where the old global-quiescence condition fails. At minimum, require a non-zero target LSN in the existing helper soGetCheckpointed() >= 0cannot make the WAL assertion vacuous for this data-bearing test. -
Correct the issue association. #25889 is the unrelated logservice snapshotManager.Init idempotency/export-quota bug and remains completely unfixed here. This PR addresses the recurrence tracked in #25931 (
TestGlobalCheckpoint2pending LSN after checkpoint completion); link that issue and keep #25889 open for its actual production fix.
Verification completed successfully: TestGlobalCheckpoint2 passed 20/20 under -race, the complete db/test package passed under -race (109.6s), latest-main prospective merge passed the target 10/10, and vet/diff checks passed. No production-code defect was found; the blockers are deterministic coverage and accurate issue traceability.
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25931 ## What this PR does / why we need it: The original test waited for the global pending WAL count to reach zero after a forced checkpoint. This was incorrect because transactions committed after the requested timestamp may legitimately create newer pending WAL LSNs. The test now validates the exact forced-checkpoint boundary instead: - The checkpoint entry is finished. - Its end timestamp covers the requested timestamp. - The WAL checkpoint eventually covers the checkpoint entry’s fixed LSN. - Newer WAL LSNs produced by later commits are allowed to remain pending. This preserves meaningful checkpoint validation without waiting for unrelated future transactions. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25931 ## What this PR does / why we need it: The original test waited for the global pending WAL count to reach zero after a forced checkpoint. This was incorrect because transactions committed after the requested timestamp may legitimately create newer pending WAL LSNs. The test now validates the exact forced-checkpoint boundary instead: - The checkpoint entry is finished. - Its end timestamp covers the requested timestamp. - The WAL checkpoint eventually covers the checkpoint entry’s fixed LSN. - Newer WAL LSNs produced by later commits are allowed to remain pending. This preserves meaningful checkpoint validation without waiting for unrelated future transactions. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: issue matrixorigin#25931 ## What this PR does / why we need it: The original test waited for the global pending WAL count to reach zero after a forced checkpoint. This was incorrect because transactions committed after the requested timestamp may legitimately create newer pending WAL LSNs. The test now validates the exact forced-checkpoint boundary instead: - The checkpoint entry is finished. - Its end timestamp covers the requested timestamp. - The WAL checkpoint eventually covers the checkpoint entry’s fixed LSN. - Newer WAL LSNs produced by later commits are allowed to remain pending. This preserves meaningful checkpoint validation without waiting for unrelated future transactions. --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
issue #25931
What this PR does / why we need it:
The original test waited for the global pending WAL count to reach zero after a
forced checkpoint. This was incorrect because transactions committed after the
requested timestamp may legitimately create newer pending WAL LSNs.
The test now validates the exact forced-checkpoint boundary instead:
This preserves meaningful checkpoint validation without waiting for unrelated
future transactions.