Skip to content

flaky test: TestSqlCatalog/TestConcurrentTableViewCollisionReturnsCatalogSentinel hits SQLITE_BUSY on ubuntu runners #1793

Description

@ryanworl

TestSqlCatalog/TestConcurrentTableViewCollisionReturnsCatalogSentinel (added in #1489) failed twice in a row on ubuntu-latest go1.26.1 in PR #1785, which doesn't touch catalog/sql:

Failure in both cases:

Error:      	Target error should be in err chain:
            	expected: "table already exists"
            	in chain: "failed to create view: database is locked (5) (SQLITE_BUSY)"

The test races a table create against a view create and expects the loser to get the table already exists catalog sentinel, but on ubuntu runners the losing writer sometimes hits SQLite's SQLITE_BUSY instead — the lock contention surfaces before the uniqueness check does. It passes consistently on macOS locally (10/10 with -count=10) and on the macOS CI jobs.

Possible fixes: set _busy_timeout/_txlock=immediate in the test DSN so the losing writer waits for the lock instead of erroring, or have the test also accept a retry-on-busy path. Happy to send a PR if maintainers have a preference.

Made with Cursor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions