merlimat commented on a change in pull request #8687:
URL: https://github.com/apache/pulsar/pull/8687#discussion_r530513211
##########
File path:
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/FunctionAssignmentTailer.java
##########
@@ -145,7 +145,7 @@ private Thread getTailerThread() {
try {
Message<byte[]> msg = reader.readNext(1, TimeUnit.SECONDS);
if (msg == null) {
- if (exitOnEndOfTopic && !reader.hasMessageAvailable())
{
+ if (exitOnEndOfTopic &&
!reader.hasMessageAvailableAsync().get(10, TimeUnit.SECONDS)) {
Review comment:
It's dangerous to have a timeout here, because we might miss messages.
Instead we should rely on the timeout in the `GetLastMessageId` RPC (which
should be already there now)
----------------------------------------------------------------
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]