agavra commented on PR #9836:
URL: https://github.com/apache/pinot/pull/9836#issuecomment-1322570283

   Thanks @61yao! I think you've identified the right problem to solve, but I 
think the abstractions in this PR aren't what we need.
   
   From a code ownership perspective, I don't think it makes sense for an 
operator chain to "own" the underlying physical resources it uses to 
send/receive data. That'll make it much more difficult in the future to share 
those resources, and it makes management of those resources happen via various 
callbacks/asynchronous actions - that in turn makes it harder to debug and 
harder to reason about.
   
   Instead, I think the current abstraction is pretty good (there's a 
centralized MailboxService that maintains the mailboxes and there's only one of 
them for the lifetime of a Pinot server). The problem you've identified is that 
we need some way to let that centralized service clean up resources that don't 
exist. I think there might be various different triggers to trigger that:
   1. (as you've identified) an operator finished (either successfully or in 
error)
   2. there might be some kind of timeouts
   3. there might be some kind of admin operation that forces it to clean up 
those mailboxes
   
   The design here (decentralizing the mailbox ownership) would make 2/3 much 
more difficult - and it leaks information into places that don't need that 
information.
   
   As an aside, I don't think contention for the concurrent hashmap is a 
problem - so long as there isn't key contention (which there should almost 
never be) it will perform extremely fast (and access to it is almost certainly 
not a bottleneck compared to all the other things a query needs to do).


-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to