bulk: "unexpected consumer closed" returned from EXPORT rather than underlying error #77928
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Describe the problem
An
EXPORT
of a large table can hitReadWithinUncertaintyIntervalError
. However, the user only sees anunexpected consumer closed
error.It appears that we may be using the EmitRow API a bit incorrectly. In the CSV exporter, we explicitly return an error:
https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/importer/exportcsv.go#L298-L300
however, if we look at what the emitRow helper does (and the callers of that interface):
https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/rowexec/processors.go#L47
and the callers of that function, none of them return errors in the case of getting ConsumerClosed or DrainRequested. I haven't chased the code all the way through, but I suspect us returning an error here is hiding the underlying error.
Jira issue: CRDB-13853
The text was updated successfully, but these errors were encountered: