Repository navigation
Conversation
ExecuteAcceptedBlocking parses before it waits; the first parse in a fresh process under -race took seconds and was counted against the test's 2s lock-wait bound, so the test failed when run alone.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
🤖 Review 1/2 (adversarial correctness) of efc4d58: 0 blocking, 1 non-blocking. Inspected the whole diff at Non-blocking
Test case: the existing test run alone fails, and passes with the warm-up in `prove`// pkg/preflight/add_column_rewrite_integration_test.go
func (f rewriteFixture) prove(t *testing.T, alter string) map[string]statement.AddColumnProof {
t.Helper()
// The proof parses its statement; the parser's first use in a process
// is slow under -race, so pay it before the deadline and the stopwatch.
_, err := statement.ParseOne(fmt.Sprintf(alter, f.schema))
require.NoError(t, err)
ctx, cancel := context.WithTimeout(t.Context(), probeDeadline)
defer cancel()
start := time.Now()
proofs, err := preflight.AddColumnRewrites(ctx, f.pool, f.schema, "t", fmt.Sprintf(alter, f.schema))
require.NoError(t, err)
assert.Less(t, time.Since(start), probeDeadline/2, "a probe waited on a lock")
return proofs
}
Verified
This review was generated by Claude Code (claude-sonnet-5-5). |
|
🤖 Review 2/2 (OSS adoption and integration ease) of efc4d58: 0 blocking, 0 non-blocking. The change is test-only, so neither lens has anything to measure in the shipped surface: no exported symbol, CLI output, document, or default moves, and OSS adoption. The PR improves the first-contact path. A new contributor who runs one test with Integration ease for schemabot and other importers. Nothing an importer links against changes. Worth knowing for importers who write their own timed tests around This review was generated by Claude Code (claude-sonnet-5-5). |
aparajon
left a comment
There was a problem hiding this comment.
🤖 Stamping with comments: 0 blocking, 1 non-blocking (see the review comment above).
This stamp was left by Claude Code (claude-sonnet-5-5).
Parse the statement before starting the stopwatch in the accepted-blocking lock-budget test, so the SQL parser's one-time startup no longer counts against the test's 2s bound.
Why
TestExecuteAcceptedBlockingLockBudgetExecutesNothingtimes a call toExecuteAcceptedBlocking, which parses its statement before it waits on anything. The first parse in a process pays the Wasm parser's startup, which under-racetook about 5.6s, so the test failed every time it ran alone even though the executor gave up the lock wait after its 100ms budget. In the full package run an earlier test has already warmed the parser, which is why it passes in CI.What
start := time.Now(), so the stopwatch covers only the call's own work.lock_timeouthardcoded to 3s, it fails at 3.0s.Before / after
Here is one example: the test's
DROP INDEX <schema>.iwhile another session holdsACCESS EXCLUSIVEon the table, with a 100ms lock budget, run alone under-race. Only the point where the stopwatch starts moves. The executor, its budget, and the 2s bound do not change.