apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.41k stars 1.27k forks source link

[multistage] [error-handling] MailboxContentStreamObserver poll infinite loop #9720

Open 61yao opened 1 year ago

61yao commented 1 year ago

Here is how it happens:

Mailbox.MailboxContent content = _receivingBuffer.poll(DEFAULT_MAILBOX_POLL_TIMEOUT, TimeUnit.MILLISECONDS);

Say we never receive this mailbox due to network or the issue stated in sort operator. _receivingBuffer.pool will throw an exception and log an error. however _isCompleted is not set to true. The code will start while loop again.

This receive is a blocking call. So we don't have timeout to break this.

61yao commented 1 year ago

@agavra

walterddr commented 1 year ago

_receivingBuffer.poll try catch only catches InterruptedException and all rest of the exception bubbles up. in this case InterruptedException means some manual interrupt (e.g. query cancellation). so i don't think this would stuck in an infinite loop.

also this is not a blocking call. poll is a park-wait this should be related to #9615