cockroachdb / cockroachdb/cockroach
basalt-26.3.2-rc-20260908: sql/importer: TestCSVImportCanBeResumed failed
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
sql/importer.TestCSVImportCanBeResumed [failed](https://mesolite.cluster.engflow.com/invocations/default/5d15a619-5664-4606-90d0-90e2519cd159?testReportRun=3&testReportShard=2&testReportAttempt=1#targets-Ly9wa2cvc3FsL2ltcG9ydGVyOmltcG9ydGVyX3Rlc3Q=) on basalt-26.3.2-rc-20260908 @ [807558e5e81666af257c811e925e4cae570abc28](https://github.com/cockroachdb/cockroach/commits/807558e5e81666af257c811e925e4cae570abc28):
```
pkg/util/ctxgroup/ctxgroup.go:200 +0x115
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:93 +0x86
Previous read at 0x00c01c0abe18 by goroutine 26424:
github.com/cockroachdb/cockroach/pkg/sql/bulksst.(*Writer).IsEmpty()
pkg/sql/bulksst/sst_writer.go:193 +0x44
github.com/cockroachdb/cockroach/pkg/sql/bulksst.(*SSTSink).IsEmpty()
pkg/sql/bulksst/sink.go:191 +0xe
github.com/cockroachdb/cockroach/pkg/sql/importer.(*importProgressTracker).flushedRowsForSink()
pkg/sql/importer/import_processor.go:679 +0x31d
github.com/cockroachdb/cockroach/pkg/sql/importer.(*importProgressTracker).formatProgress()
pkg/sql/importer/import_processor.go:637 +0x37d
github.com/cockroachdb/cockroach/pkg/sql/importer.ingestKvs.func1()
pkg/sql/importer/import_processor.go:349 +0x8f
github.com/cockroachdb/cockroach/pkg/sql/importer.ingestKvs.func3()
pkg/sql/importer/import_processor.go:453 +0x20a
github.com/cockroachdb/cockroach/pkg/sql/importer.ingestKvs.Group.GoCtx.func5()
pkg/util/ctxgroup/ctxgroup.go:200 +0x115
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:93 +0x86
Goroutine 26425 (running) created at:
golang.org/x/sync/errgroup.(*Group).Go()
external/org_golang_x_sync/errgroup/errgroup.go:78 +0x11c
github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx()
pkg/util/ctxgroup/ctxgroup.go:191 +0x1809
github.com/cockroachdb/cockroach/pkg/sql/importer.ingestKvs()
pkg/sql/importer/import_processor.go:460 +0x1457
github.com/cockroachdb/cockroach/pkg/sql/importer.runImport.func2()
pkg/sql/importer/read_import_base.go:127 +0xdb
github.com/cockroachdb/cockroach/pkg/sql/importer.runImport.Group.GoCtx.func5()
pkg/util/ctxgroup/ctxgroup.go:200 +0x115
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:93 +0x86
Goroutine 26424 (running) created at:
golang.org/x/sync/errgroup.(*Group).Go()
external/org_golang_x_sync/errgroup/errgroup.go:78 +0x11c
github.com/cockroachdb/cockroach/pkg/util/ctxgroup.Group.GoCtx()
pkg/util/ctxgroup/ctxgroup.go:191 +0x1456
github.com/cockroachdb/cockroach/pkg/sql/importer.ingestKvs()
pkg/sql/importer/import_processor.go:442 +0x1285
github.com/cockroachdb/cockroach/pkg/sql/importer.runImport.func2()
pkg/sql/importer/read_import_base.go:127 +0xdb
github.com/cockroachdb/cockroach/pkg/sql/importer.runImport.Group.GoCtx.func5()
pkg/util/ctxgroup/ctxgroup.go:200 +0x115
golang.org/x/sync/errgroup.(*Group).Go.func1()
external/org_golang_x_sync/errgroup/errgroup.go:93 +0x86
==================
```
Parameters:
- attempt=1
- race=true
- run=3
- shard=2
Help
See also: [How To Investigate a Go Test Failure \(internal\)](https://cockroachlabs.atlassian.net/l/c/HgfXfJgM)
/cc @cockroachlabs/sql-foundations
[This test on roachdash](https://roachdash.crdb.dev/?filter=status:open%20t:.*TestCSVImportCanBeResumed.*&sort=title+created&display=lastcommented+project) | [Improve this report!](https://github.com/cockroachdb/cockroach/tree/master/pkg/cmd/bazci/githubpost/issues)
Contributor guide
Research direction
Start by reproducing sql/importer.TestCSVImportCanBeResumed with the race configuration from the report. Read pkg/sql/importer/import_processor.go, especially ingestKvs and importProgressTracker, then inspect pkg/sql/bulksst/sst_writer.go and sink.go at the reported IsEmpty calls. Done means the resumed CSV import test passes under the race detector without a data race.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100