Skip to content

Commit

Permalink
Merge pull request #119267 from yuzefovich/backport23.1-119175
Browse files Browse the repository at this point in the history
release-23.1: sessiondatapb: correctly propagate streamer_enabled to remote nodes
  • Loading branch information
yuzefovich authored Feb 21, 2024
2 parents cccf67f + f676eab commit 0c7c814
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions pkg/sql/colflow/draining_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func TestDrainingAfterRemoteError(t *testing.T) {
// Make sure that the query is fully distributed (i.e. all execution happens
// on node 2).
sqlDB.Exec(t, "SET distsql = always;")
// Disable the streamer to prevent this test from triggering the known race
// #119201.
sqlDB.Exec(t, "SET streamer_enabled = false;")

// Sanity check that, indeed, node 2 is part of the physical plan.
rows, err := conn.Query("EXPLAIN (VEC) SELECT sum(length(v)) FROM large, small WHERE small.k = large.k GROUP BY large.k;")
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ func applyInternalExecutorSessionExceptions(sd *sessiondata.SessionData) {
// At the moment, we disable the usage of the Streamer API in the internal
// executor to avoid possible concurrency with the "outer" query (which
// might be using the RootTxn).
sd.LocalOnlySessionData.StreamerEnabled = false
sd.SessionData.StreamerEnabled = false
}

// applyOverrides overrides the respective fields from sd for all the fields set on o.
Expand Down
3 changes: 1 addition & 2 deletions pkg/sql/sessiondatapb/local_only_session_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ message LocalOnlySessionData {
// Execution of these deallocated prepared statements will fail until they are
// prepared again.
int64 prepared_statements_cache_size = 97;
// StreamerEnabled controls whether the Streamer API can be used.
bool streamer_enabled = 98;
reserved 98;
// DisableDropVirtualCluster causes errors when the client
// attempts to drop virtual clusters or tenant records.
bool disable_drop_virtual_cluster = 99;
Expand Down
2 changes: 2 additions & 0 deletions pkg/sql/sessiondatapb/session_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ message SessionData {
// head-of-the-line request in case the "eager" memory usage limit has been
// exceeded.
double streamer_head_of_line_only_fraction = 30;
// StreamerEnabled controls whether the Streamer API can be used.
bool streamer_enabled = 32;
}

// DataConversionConfig contains the parameters that influence the output
Expand Down

0 comments on commit 0c7c814

Please sign in to comment.