jayshrivastava commented on issue #8777:
URL: https://github.com/apache/datafusion/issues/8777#issuecomment-3902239011

   > Why not? Can you provide an example of what you are thinking of here?
   
   > Is this like if the join probe input is shared?
   
   Yes. Just restating the deadlock concern from the issue description. I 
generated this diagram to show the problem - if the probe side buffer is full, 
the "FanoutExec" is back-pressured. We end up blocking the build side from 
completing and deadlock.
   
   In this case, we can either spill to disk on the probe side or simply not 
insert a "FanoutExec".
   ```
                                     ┌───────────────────────────┐
                                     │         HashJoin          │
                                     │                           │
                                     │  Build side   Probe side  │
                                     └───────▲──────────▲────────┘
                                             │          │
                                    (polls)  │          │  (NOT polling yet)
                                             │          │
                                  ┌──────────┘          └──────────┐
                                  │                                │
                                  │                                │
                      ┌────────────────────┐            ┌────────────────────┐
                      │   Build input buf  │            │   Probe input buf  │
                      │ (channel / queue)  │            │ (channel / queue)  │
                      └─────────▲──────────┘            └─────────▲──────────┘
                                │                                 │
                                │                                 │
                                └───────────────┬─────────────────┘
                                                │
                                                │  (single producer must 
"tee"/broadcast)
                                                │
                                  ┌──────────────────────────────┐
                                  │       FanoutExec             │
                                  │   Expensive Join / CTE eval  │
                                  └──────────────▲───────────────┘
                                                 │
                                                 │ (polls upstream)
                                                 │
                                     ┌───────────────────────────┐
                                     │      Input1 / Input2      │
                                     └───────────────────────────┘
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to