distsql: remove possibility of inbound stream timeout errors #27753
Labels
A-sql-execution
Relating to SQL execution.
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
We currently set up a flow by sending out
n
SetupFlowRequest
s to all participating nodes in a query. These then set up any necessary connections between them by having outboxes send aFlowStream
RPC to a destination node. TheseFlowStream
RPCs wait up to a timeout for the corresponding flow to be registered on the destination node. Note that aSetupFlowRequest
does not actually callRegisterFlow
. That only happens onceStart
is called.We have run into a bunch of issues with streams timing out because these two events don't line up within the timeout. I think we could get rid of a lot of these cases by having
SetupFlowRequest
s include theFlowSpec
s of all downstream nodes. TheFlowStream
requests would use these and could be made responsible to set up the flows on remote nodes actively instead of waiting for aSetupFlowRequest
if the flow isn't registered.More details to come.
The text was updated successfully, but these errors were encountered: