Skip to content

[Bug]: authorization epoch UT fails when DROP ACCOUNT cleanup exceeds its independent 30s deadline #30879

Closed

Description

@XuPeng-SH

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Searched the exact test name, epoch_auth, and account-cleanup timeout signatures. Related closed issue #30454 documents other deferred catalog cleanup deadlines; this report tracks a new occurrence in the authorization-epoch test, without asserting a common root cause.

Branch Name

codex/fix-30795-having-aggregate-alias, targeting main (PR #30865).

Commit ID

ee1b47589c4caa3dae9d2c08af52ef462d9e6182 (workflow head SHA).

Other Environment Information

Actual Behavior

The Ubuntu/x86 UT job fails on pkg/tests/issues/TestStatementAuthorizationEpochAcrossCatalogCommit (172.22s). The authorization/transaction assertions reach the end of the test body; the sole reported failure is deferred tenant cleanup:

authorization_epoch_test.go:49
Error Trace: issue_9847_test.go:94
             authorization_epoch_test.go:49
             authorization_epoch_test.go:153
Received unexpected error: context deadline exceeded
Messages: drop account epoch_auth

The cleanup creates its own context.Background()-derived 30-second deadline, independent of the test body's 120-second context. This is not reuse of an already expired body context.

UTC timeline on 2026-10-22:

  • 15:05:38.337: DROP ACCOUNT starts account locking and sequential catalog cleanup.
  • 15:05:53–15:06:04: continues removing Iceberg/MongoDB/compatibility/partition metadata.
  • 15:06:08.211: reaches removal of mo_catalog.mo_indexes.
  • 15:06:08.32: client cleanup assertion fails at its 30-second deadline.
  • After client cancellation, additional server-side catalog steps are still logged; at 15:06:20.150 the DROP request reports context canceled during fixture shutdown.

Nearby evidence of slow progress includes WAL append latencies around 2.82s, slow transaction commits, Raft proposal/heartbeat timeouts and batched LocalTick warnings. These are observed symptoms, not proof of CPU contention, network failure, deadlock or a particular storage root cause.

Expected Behavior

Preserve all authorization/epoch and transaction assertions. Tenant cleanup should complete reliably with correctly owned sessions, transactions and cancellation, or expose a precise bounded failure. Establish why sequential DROP ACCOUNT exceeds the budget before choosing a correction; do not hide it with skipped assertions, automatic retries or an unexplained timeout increase.

Steps to Reproduce

  1. Use the recorded commit and the Linux/amd64 CI entry above to reproduce the original workload/history.
  2. For diagnosis, select the existing test with the repository-supported CGo wrapper:
.agents/skills/mo-dev/scripts/mo-cgo-test -count=1 -short -race -tags=matrixone_test -timeout=10m -run '^TestStatementAuthorizationEpochAcrossCatalogCommit$' ./pkg/tests/issues

The focused command is a proposed diagnostic selection, not a claimed local reproduction. The captured CI failure is the executed evidence; no clean-base comparison has been run for this occurrence.

Additional information

Source at the recorded commit:

  • defer func() {
    cleanup, stop := context.WithTimeout(context.Background(), 30*time.Second)
    defer stop()
    mustExec(t, cleanup, root, "drop account epoch_auth")
    }()
  • mustExec forwards ExecContext errors directly through require.NoError (pkg/tests/issues/issue_9847_test.go:94).

Confirmed immediate cause: independent 30-second DROP ACCOUNT cleanup expires while sequential catalog operations are still progressing. Underlying service slowdown remains unresolved. This failure does not demonstrate a HAVING-alias result regression; attribution to PR #30865 is not established. Investigate cleanup ordering relative to still-open account sessions, catalog/transaction commit costs and runner scheduling/I/O evidence without assuming any of them is the cause.

Activity

  1. added
    kind/bug
    on Oct 22, 2026
  2. self-assigned this
    on Oct 22, 2026
  3. XuPeng-SH commented on Oct 24, 2026

    @XuPeng-SH
    ContributorAuthor

    Verified the existing #30980 correction on current main dae02bbaaaa18aac7fa9b788e42f4483b3adf091: exact TestStatementAuthorizationEpochAcrossCatalogCommit passed under Linux/amd64 race + matrixone_test, including its scenario and account-disappearance cleanup (14.000s package, 12.78s test). The fixture now owns dedicated connections, closes tenant connections/pools before DROP ACCOUNT while root remains alive, finishes cleanup before releasing shared admission, and uses the existing bounded account-cleanup policy. All authorization/transaction assertions remain. Closing as completed by that cleanup correction; no claim that underlying WAL/catalog slowdown was eliminated.

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

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions