xiangfu0 commented on code in PR #11394:
URL: https://github.com/apache/pinot/pull/11394#discussion_r1299363951
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -59,17 +60,25 @@ public GrpcSendingMailbox(String id, ChannelManager
channelManager, String hostn
@Override
public void send(TransferableBlock block)
- throws IOException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("==[GRPC SEND]== sending data to: " + _id);
- }
+ throws IOException, TimeoutException {
if (isTerminated()) {
return;
}
- if (_contentObserver == null) {
- _contentObserver = getContentObserver();
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("==[GRPC SEND]== sending data to: " + _id);
+ }
+ try {
+ if (_contentObserver == null) {
+ _contentObserver = getContentObserver();
+ }
+ _contentObserver.onNext(toMailboxContent(block));
+ } catch (Exception e) {
+ if (System.currentTimeMillis() > _deadlineMs) {
+ throw new TimeoutException(String.format("Timed out sending data to
mailbox: %s, got exception: %s", _id, e));
Review Comment:
This `e` might not be timeout right? Possible to composite and throw both
exceptions ?
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -59,17 +60,25 @@ public GrpcSendingMailbox(String id, ChannelManager
channelManager, String hostn
@Override
public void send(TransferableBlock block)
- throws IOException {
- if (LOGGER.isDebugEnabled()) {
- LOGGER.debug("==[GRPC SEND]== sending data to: " + _id);
- }
+ throws IOException, TimeoutException {
if (isTerminated()) {
return;
}
- if (_contentObserver == null) {
- _contentObserver = getContentObserver();
+ if (LOGGER.isDebugEnabled()) {
+ LOGGER.debug("==[GRPC SEND]== sending data to: " + _id);
+ }
+ try {
+ if (_contentObserver == null) {
+ _contentObserver = getContentObserver();
+ }
+ _contentObserver.onNext(toMailboxContent(block));
Review Comment:
do you need to check timeout here?
--
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]