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
This commit hardens c17591e. In
particular, in that change we disabled the usage of the Streamer
whenever some part of the plan isn't distributable. However, population
of `distSQLProhibitedErr` was left on a best-effort basis. In
particular, if we have `distsql=off` (as well as a couple of other
conditions), we'd skip the supportability check. This meant that we
could still end up using the Streamer in some illegal cases - one
example that I came up with is if we have a routine (which currently
prohibits distsql), it might access the RootTxn concurrently with the
LeafTxn access by the Streamer, which is no bueno. This commit makes it
so that we do DistSQL supportability check unconditionally. Note that
this shouldn't really have a performance impact - after all, we do
expect this check to be done pretty much all the time (unless someone
runs with `distsql=off`).
Additionally, this change happens to fix a nil pointer error around the
recent fix to top-level query stats in presence of routines. Namely,
that patch only set the metadata forwarder for local plans if we end up
using the RootTxn, but in a query where we happened to use the streamer
with routines, (before this patch) we'd end up with LeafTxn and unset
metadata forwarder. Now we'll have streamer disabled, so we'll have the
RootTxn and the forwarder will be set.
Release note: None
SELECT a, jsonb_path_query(b, '$.a.b'), jsonb_path_query(b, '$.a.d') FROM json_tab@foo_inv WHERE jsonb_path_exists(b, '$.a.b') AND jsonb_path_exists(b, '$.a.d') ORDER BY a;
0 commit comments