ankitsultana commented on code in PR #10425:
URL: https://github.com/apache/pinot/pull/10425#discussion_r1136689520
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/GrpcSendingMailbox.java:
##########
@@ -84,14 +93,15 @@ public boolean isInitialized() {
public void cancel(Throwable t) {
if (_initialized.get() && !_statusObserver.isFinished()) {
LOGGER.warn("GrpcSendingMailbox={} cancelling stream", _mailboxId);
- try {
- _mailboxContentStreamObserver.onError(Status.fromThrowable(
- new RuntimeException("Cancelled by the
sender")).asRuntimeException());
- } catch (Exception e) {
- // TODO: We don't necessarily need to log this since this is
relatively quite likely to happen. Logging this
- // anyways as info for now so we can see how frequently this happens.
- LOGGER.info("Unexpected error issuing onError to
MailboxContentStreamObserver: {}", e.getMessage());
- }
+ DELAYED_CANCEL_SCHEDULER.schedule(() -> {
+ try {
+
_mailboxContentStreamObserver.onError(Status.CANCELLED.asRuntimeException());
Review Comment:
Changed this to simply cancelled since when sender issues onError, a
rst_stream packet is sent on the stream and no additional data is sent to the
receiver. In other words, receiver only sees a cancellation on its end.
However when a server calls its outbound onError then the trailers have
information about the Status which contains the exception message, so in those
cases we should continue to pass the detailed Status.
--
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]