Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
98655: rowflow: remove redundant copyingRowReceiver in gateway row-based flow r=yuzefovich a=yuzefovich Currently, in row-based flows we always wrap the output of each processor (most commonly `RowChannel`) with `copyingRowReceiver` which performs a shallow copy of each row. This is needed because the contract of `RowSource.Next` is such that the rows are only safe until the next call to `Next`. Each processor could run in a separate goroutine, so we need this copying behavior to protect rows from corruption. However, we often can fuse processors together (meaning that we remove the RowChannel between two processors and make two of them run in the same goroutine), and in that case we already remove this `copyingRowReceiver` to avoid unnecessary row copies. This commit adds another case where we can safely remove the redundant `copyingRowReceiver` - when we have a flow on the gateway, then the output of the "head" processor is `DistSQLReceiver`, and it's pushed into from the same goroutine as the "head" processor, so we don't need row copies. Epic: None Release note: None 111925: roachtest: fix read committed variant of ycsb r=rafiss a=nvanbenschoten This was broken by 53ed1cd. Epic: None Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Nathan VanBenschoten <[email protected]>
- Loading branch information