Skip to content

[Bug]: TransferHashPage path races with TTL cleanup in TestClearPersistTransferTable #26523

Closed

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I searched open and closed matrixorigin/matrixone issues for TestClearPersistTransferTable, TransferHashPage, SetPath, and ClearPersistTable; no matching issue was found.

Branch Name

main

Commit ID

0b8b53d

Other Environment Information

  • GitHub Actions workflow: MatrixOne ALL CI
  • Job: Matrixone CI / UT Test on Ubuntu/x86
  • Runner: Ubuntu x86, Go race detector enabled
  • PR head tested: 1fd0b38f5c31b681acca920cd983b05779095b08

Actual Behavior

TestClearPersistTransferTable fails under the race detector because TransferHashPage.path is accessed concurrently without synchronization.

The detected write is:

github.com/matrixorigin/matrixone/pkg/vm/engine/tae/model.(*TransferHashPage).SetPath()
    pkg/vm/engine/tae/model/pages.go:351
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/db/test.TestClearPersistTransferTable.func1()
    pkg/vm/engine/tae/db/test/db_test.go:11690

The concurrent read is:

github.com/matrixorigin/matrixone/pkg/vm/engine/tae/model.(*TransferHashPage).ClearPersistTable()
    pkg/vm/engine/tae/model/pages.go:404
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/model.(*TransferHashPage).Close()
github.com/matrixorigin/matrixone/pkg/vm/engine/tae/model.(*TransferTable).executeTTL()

The read runs from the transfer-table TTL cron goroutine while the test goroutine assigns the persisted path. The race detector terminates the test with race detected during execution of test.

Failing job: https://github.com/matrixorigin/matrixone/actions/runs/30623452935/job/91133128589

This was observed while validating PR #26504, whose diff only changes Data Branch float SQL formatting and its regression tests; it does not touch TAE transfer pages or TTL lifecycle code.

Expected Behavior

Publication and consumption of a persisted transfer-page path must have a defined synchronization/ownership contract. SetPath, loading, TTL cleanup, close, and string/logging paths should not concurrently read and write TransferHashPage.path without synchronization, and the focused test should pass under -race.

Steps to Reproduce

  1. Check out commit 0b8b53dff3869dcd5e3ab52992852c9ea6545026 or the tested PR head.
  2. Run the focused TAE DB test with the race detector, using the repository's required CGo test environment:
go test -race ./pkg/vm/engine/tae/db/test -run '^TestClearPersistTransferTable$' -count=1
  1. If the timing does not trigger on the first attempt, repeat the focused test or run the full Ubuntu/x86 UT workflow.
  2. Observe the race between TransferHashPage.SetPath and TransferHashPage.ClearPersistTable through the TTL cron job.

Additional information

The relevant field is a composite model.Path. A correct fix should cover all concurrent readers of page.path, not only the two race-detector frames shown above, and should preserve the transfer-page TTL and persisted-file cleanup semantics.

Activity

  1. added
    kind/bug
    on Jul 31, 2026
  2. self-assigned this
    on Jul 31, 2026
  3. added
    severity/s0
    ai-easy
    and removed on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-easykind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions