Skip to content

[Bug]: TestConvertRowsIntoBatchTemporalText races with Go timers when writing time.Local #32893

Closed

Description

@aptend

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

Observed on feat/index-stats-readonly in #32698. The same test is present on main since #32456.

Commit ID

91836f3830261dcad705f8e9e0231f2170f13dba

Other Environment Information

GitHub Actions, Ubuntu x86-64, Go 1.27.1, race detector enabled.

Actual Behavior

TestConvertRowsIntoBatchTemporalText temporarily assigns a fixed zone to the process-wide time.Local. During the frontend package tests, a background timer called time.Now() and read the same variable concurrently. The race detector failed the test. Failing CI job · Test source on the PR base

WARNING: DATA RACE
Write ... pkg/frontend.TestConvertRowsIntoBatchTemporalText()
          pkg/frontend/time_zone_and_saved_temporal_test.go:58
Previous read ... time.Now()
                  time.sendTime()

Expected Behavior

The test should still catch regressions where timestamp conversion uses the process timezone instead of the session timezone, and should pass under the race detector.

Steps to Reproduce

Run the same unit-test target used by the failing CI job in a clean checkout with the CI prerequisites installed.

make config
make ut UT_CONFIGURED=1 UT_PARALLEL=8 UT_TIMEOUT=40 UT_SHARD=all

The failure is intermittent. It requires a timer read to overlap the test's write to time.Local.

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