[Bug]: Kafka reader close races with a background fetch after cancellation at a batch boundary
I maintainer di solito rispondono entro 1 giorno
@matrix-meow ci sta già lavorando.
Dal 27/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
v4.2.8-hotfix
Commit ID
Observed on PR head 67e6deb3948af36d563e9637365e017d085e1da8 against 21b9b39bbca86a981e3a77b370c51cb602b88637.
Other Environment Information
Ubuntu x86-64 CI, Go 1.26.4 with the race detector, franz-go v1.21.6.
Actual Behavior
The race detector failed TestKafkaReaderCancelAtBatchBoundary while KafkaReader.Close was closing the Kafka client. The closing goroutine read fetch-session state in kgo.(*Client).close.func2 (client.go:1345) while the fetch goroutine updated it in (*fetchSession).bumpEpoch (source.go:2923). Additional reports show killSessionOnClose racing with commitFromReq on the same session. The failing test, its setup helpers, the reader implementation and the pinned dependency versions match the target branch. Failed CI job and race report
Expected Behavior
Closing a Kafka reader after cancellation at a batch boundary safely joins its background fetch activity.
Steps to Reproduce
Run the existing test with the race detector in a CGo-enabled checkout. The failure is timing dependent.
GOTOOLCHAIN=go1.26.4 .agents/skills/mo-dev/scripts/mo-cgo-test -race -run '^TestKafkaReaderCancelAtBatchBoundary$' -count=100 ./pkg/sql/colexec/external
Additional information
The test opens a reader against a one-broker kfake cluster, cancels before the next batch starts, verifies that the read reports cancellation, and closes the reader. CI detected the race during the final close.
- Lingua principale
- Go
- Stelle
- 1.9k
- Fork
- 312
- Merge medio
- 22h 59m
- PR unite (30g)
- 736
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di matrixorigin/matrixone
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
matrixorigin/matrixone#33363 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
matrixorigin/matrixone#33362 ·
I maintainer di solito rispondono entro 1 giorno
-
SLEEP rejects NULL and negative durations that MySQL acceptsForse già presa @XuPeng-SH l’ha presa 7 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
matrixorigin/matrixone#32653 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: TestChangeWatchProxy loses its first tenant connection during PingContext in Ubuntu CIForse già presa @XuPeng-SH l’ha presa oggi. Apertakind/bug needs-triage
matrixorigin/matrixone#33371 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: TestDaemonClaimSQLRoundTrip exhausts its shared deadline during the stale claim update in Ubuntu CIForse già presa @XuPeng-SH l’ha presa oggi. Apertakind/bug needs-triage
matrixorigin/matrixone#33370 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di matrixorigin/matrixone
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
pg-sharding/spqr#3314 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
zalando/postgres-operator#3257 ·
I maintainer di solito rispondono entro 2 giorni
-
[inputs.internal] README lists go_version tag on internal_gather instead of internal_agentForse già presa @cvas22 l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
influxdata/telegraf#20264 ·
I maintainer di solito rispondono entro 1 giorno