jerrypeng commented on a change in pull request #7211:
URL: https://github.com/apache/pulsar/pull/7211#discussion_r437610107
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionMetaDataTopicTailer.java
##########
@@ -69,28 +106,13 @@ public void processRequest(Message<byte[]> msg) {
serviceRequest = ServiceRequest.parseFrom(msg.getData());
} catch (IOException e) {
log.error("Received bad service request at message {}",
msg.getMessageId(), e);
- // TODO: find a better way to handle bad request
- throw new RuntimeException(e);
+ errorNotifier.triggerError(e);
Review comment:
> We would still need to differentiate Interrupted vs others.
I don't quite follow, the code already differentiates interrupted exceptions
vs other exceptions.
Triggering the error in the catch all block in the thread allows us to exit
the thread as well and stop further processing of requests. While this doesn't
hurt but is cleaner in a sense.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]