You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql/export: refactor processors to implement RowSource interface
We recently found an edge case where the output of EXPORT was used as an
input to a mutation. Currently, in such a setup we have two goroutines
since the export processors don't implement `execinfra.RowSource`
interface, so we cannot fuse them with the mutation processor. Presence
of concurrency forces usage of the LeafTxns, yet mutations require
access to the RootTxn, thus we have conflicting requirements. Before the
previous commit we'd get a nil pointer crash, with the previous
commit in place we now get an assertion failure.
This commit solves this issue by refactoring both processors to
implement the `RowSource` interface. In the problematic query it allows
all processors to be fused together to run in a single goroutine, so we
can use the RootTxn as required by the mutation.
Release note (bug fix): Previously, EXPORT CSV and EXPORT PARQUET stmts
could result in a node crash when their result rows were used as the
input to a mutation like an INSERT within the same SQL. This bug has
been present since before 22.1 version and has now been fixed.
0 commit comments