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.
Blocking finding — fence the checkpoint intent generation as well (pkg/vm/engine/tae/db/testutil/funcs.go:323). The predicate still re-reads the current GetICKPIntentOnlyForTest() through latestCheckpointFinished. Concrete sequence: the waiter captures T; the checkpoint covering T completes so GetCheckpointed() >= T; WAL T+1 arrives; softScheduleCheckpoint installs a new ST_Pending intent with UpdateICKPIntent(..., true, false) while its dirty data is not yet flushed. checkpointTargetReached is then true, but latestCheckpointFinished is false, so this waiter still chases post-fence work and can time out after 10 seconds even though T is durable. The existing Test_RunnerStore3 state sequence already demonstrates finished intent -> nil -> newer pending intent. The added test only exercises the numeric helper and cannot catch this path. Please bind the lifecycle check to the checkpoint/intent generation that covered T (or another target-scoped completion signal), and add a deterministic regression with a newer pending intent installed after T completes.
15d86e8 to
dc9a2ab
Compare
dc9a2ab to
879e64b
Compare
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep-reviewed exact head 879e64bf2a962d8b0cfd983cd6d79e8964203a62. No blocking issues remain.
The previous generation-fencing finding is resolved: after all append workers finish, the test captures a target TS and calls ForceCheckpoint; ForceFlush is bounded by the caller context, and ForceICKP waits on the concrete intent returned for that target, then verifies the finished incremental checkpoint covers the target. It does not re-read or chase a later live intent generation. Success and rollback paths both close the shared intent completion channel.
Verified locally: TestAppendAndGC2 20x, TestAppendAndGC|TestAppendAndGC2 under race 3x, the full db/test and checkpoint packages, go vet, formatting, and diff/delivery checks. Merge after the in-progress CI finishes green.
Merge Queue Status
This pull request spent 10 minutes 16 seconds in the queue, with no time running CI. ReasonPull request #26033 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
HintYou should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. Tick the box to put this pull request back in the merge queue (same as
|
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26031 ## What this PR does / why we need it: `TestAppendAndGC2` used the generic global-quiescence waiter after its append workload. That contract is not satisfiable in this test: it sets `CheckpointCfg.MinCount = 3`, so a post-fence tail of one WAL entry is valid background state and does not schedule another incremental checkpoint. CI observed target LSN 201 already covered by checkpointed LSN 203, while current LSN 204 remained pending. The previous revision fenced only the numeric LSN but still sampled the live checkpoint intent. That mixed generations in both directions: a newer pending intent could extend the wait, while the nil interval between generations could let the waiter return before the newer ICKP started. The latter happened in `TestAppendAndGC`: the waiter returned and the following zero-pending assertion observed 2 while the next ICKP was starting. This revision leaves the shared waiter and checkpoint runner unchanged. Once all append workers finish, `TestAppendAndGC2` explicitly calls `ForceCheckpoint` with `TxnMgr.Now()` under a 10-second context. `ForceCheckpoint` waits on the checkpoint intent that covers that target TS, so the test gets a target-scoped completion signal without chasing or sampling a different generation. The change is test-only and does not affect MatrixOne runtime behavior. Validation: - `TestAppendAndGC|TestAppendAndGC2`: 20 iterations each - the same two tests under `-race`: 3 iterations each - full `./pkg/vm/engine/tae/db/test` package - 16 representative shared-waiter callers, including checkpoint, GC, PITR, ISCP, snapshot, and replay tests - `go vet ./pkg/vm/engine/tae/db/test ./pkg/vm/engine/tae/db/testutil` - `git diff --check` Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26031 ## What this PR does / why we need it: `TestAppendAndGC2` used the generic global-quiescence waiter after its append workload. That contract is not satisfiable in this test: it sets `CheckpointCfg.MinCount = 3`, so a post-fence tail of one WAL entry is valid background state and does not schedule another incremental checkpoint. CI observed target LSN 201 already covered by checkpointed LSN 203, while current LSN 204 remained pending. The previous revision fenced only the numeric LSN but still sampled the live checkpoint intent. That mixed generations in both directions: a newer pending intent could extend the wait, while the nil interval between generations could let the waiter return before the newer ICKP started. The latter happened in `TestAppendAndGC`: the waiter returned and the following zero-pending assertion observed 2 while the next ICKP was starting. This revision leaves the shared waiter and checkpoint runner unchanged. Once all append workers finish, `TestAppendAndGC2` explicitly calls `ForceCheckpoint` with `TxnMgr.Now()` under a 10-second context. `ForceCheckpoint` waits on the checkpoint intent that covers that target TS, so the test gets a target-scoped completion signal without chasing or sampling a different generation. The change is test-only and does not affect MatrixOne runtime behavior. Validation: - `TestAppendAndGC|TestAppendAndGC2`: 20 iterations each - the same two tests under `-race`: 3 iterations each - full `./pkg/vm/engine/tae/db/test` package - 16 representative shared-waiter callers, including checkpoint, GC, PITR, ISCP, snapshot, and replay tests - `go vet ./pkg/vm/engine/tae/db/test ./pkg/vm/engine/tae/db/testutil` - `git diff --check` Co-authored-by: XuPeng-SH <[email protected]>
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [x] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Fixes matrixorigin#26031 ## What this PR does / why we need it: `TestAppendAndGC2` used the generic global-quiescence waiter after its append workload. That contract is not satisfiable in this test: it sets `CheckpointCfg.MinCount = 3`, so a post-fence tail of one WAL entry is valid background state and does not schedule another incremental checkpoint. CI observed target LSN 201 already covered by checkpointed LSN 203, while current LSN 204 remained pending. The previous revision fenced only the numeric LSN but still sampled the live checkpoint intent. That mixed generations in both directions: a newer pending intent could extend the wait, while the nil interval between generations could let the waiter return before the newer ICKP started. The latter happened in `TestAppendAndGC`: the waiter returned and the following zero-pending assertion observed 2 while the next ICKP was starting. This revision leaves the shared waiter and checkpoint runner unchanged. Once all append workers finish, `TestAppendAndGC2` explicitly calls `ForceCheckpoint` with `TxnMgr.Now()` under a 10-second context. `ForceCheckpoint` waits on the checkpoint intent that covers that target TS, so the test gets a target-scoped completion signal without chasing or sampling a different generation. The change is test-only and does not affect MatrixOne runtime behavior. Validation: - `TestAppendAndGC|TestAppendAndGC2`: 20 iterations each - the same two tests under `-race`: 3 iterations each - full `./pkg/vm/engine/tae/db/test` package - 16 representative shared-waiter callers, including checkpoint, GC, PITR, ISCP, snapshot, and replay tests - `go vet ./pkg/vm/engine/tae/db/test ./pkg/vm/engine/tae/db/testutil` - `git diff --check` Co-authored-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #26031
What this PR does / why we need it:
TestAppendAndGC2used the generic global-quiescence waiter after its appendworkload. That contract is not satisfiable in this test: it sets
CheckpointCfg.MinCount = 3, so a post-fence tail of one WAL entry is validbackground state and does not schedule another incremental checkpoint. CI
observed target LSN 201 already covered by checkpointed LSN 203, while current
LSN 204 remained pending.
The previous revision fenced only the numeric LSN but still sampled the live
checkpoint intent. That mixed generations in both directions: a newer pending
intent could extend the wait, while the nil interval between generations could
let the waiter return before the newer ICKP started. The latter happened in
TestAppendAndGC: the waiter returned and the following zero-pendingassertion observed 2 while the next ICKP was starting.
This revision leaves the shared waiter and checkpoint runner unchanged. Once
all append workers finish,
TestAppendAndGC2explicitly callsForceCheckpointwithTxnMgr.Now()under a 10-second context.ForceCheckpointwaits on the checkpoint intent that covers that target TS,so the test gets a target-scoped completion signal without chasing or sampling
a different generation. The change is test-only and does not affect MatrixOne
runtime behavior.
Validation:
TestAppendAndGC|TestAppendAndGC2: 20 iterations each-race: 3 iterations each./pkg/vm/engine/tae/db/testpackageISCP, snapshot, and replay tests
go vet ./pkg/vm/engine/tae/db/test ./pkg/vm/engine/tae/db/testutilgit diff --check