This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new ce35b36c3f [multistage] Do Not Ignore Exception in
MailboxReceiveOperator (#10107)
ce35b36c3f is described below
commit ce35b36c3f172f1bbcc71dc7a924912475b3488e
Author: Ankit Sultana <[email protected]>
AuthorDate: Fri Jan 13 05:58:50 2023 +0530
[multistage] Do Not Ignore Exception in MailboxReceiveOperator (#10107)
* Do Not Ignore Exception in MailboxReceiveOperator
* Fix test
---
.../apache/pinot/query/runtime/operator/MailboxReceiveOperator.java | 4 ++--
.../pinot/query/runtime/operator/MailboxReceiveOperatorTest.java | 5 +----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git
a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java
b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java
index 4c2011597e..c5b618a533 100644
---
a/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java
+++
b/pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperator.java
@@ -167,8 +167,8 @@ public class MailboxReceiveOperator extends
BaseOperator<TransferableBlock> {
}
}
} catch (Exception e) {
- // TODO: Handle this exception.
- LOGGER.error(String.format("Error receiving data from mailbox %s",
mailboxId), e);
+ return TransferableBlockUtils.getErrorTransferableBlock(
+ new RuntimeException(String.format("Error polling mailbox=%s",
mailboxId), e));
}
}
diff --git
a/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperatorTest.java
b/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperatorTest.java
index 3f6a6c5e79..5c3008ae42 100644
---
a/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperatorTest.java
+++
b/pinot-query-runtime/src/test/java/org/apache/pinot/query/runtime/operator/MailboxReceiveOperatorTest.java
@@ -496,7 +496,6 @@ public class MailboxReceiveOperatorTest {
Assert.assertTrue(error.getExceptions().get(QueryException.UNKNOWN_ERROR_CODE).contains("mailboxError"));
}
- // TODO: Exception should be passed as an errorBlock.
@Test
public void shouldThrowReceiveWhenOneServerReceiveThrowException()
throws Exception {
@@ -531,8 +530,6 @@ public class MailboxReceiveOperatorTest {
MailboxReceiveOperator receiveOp = new
MailboxReceiveOperator(_mailboxService, ImmutableList.of(_server1, _server2),
RelDistribution.Type.HASH_DISTRIBUTED, toHost, toPort, jobId, stageId,
null);
TransferableBlock receivedBlock = receiveOp.nextBlock();
- List<Object[]> resultRows = receivedBlock.getContainer();
- Assert.assertEquals(resultRows.size(), 1);
- Assert.assertEquals(resultRows.get(0), expRow3);
+ Assert.assertTrue(receivedBlock.isErrorBlock(), "server-1 should have
returned an error-block");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]