BewareMyPower commented on code in PR #21417:
URL: https://github.com/apache/pulsar/pull/21417#discussion_r1370112496
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TableViewImpl.java:
##########
@@ -232,33 +232,33 @@ private void handleMessage(Message<T> msg) {
@Override
public CompletableFuture<Void> refreshAsync() {
- return reader.thenCompose(this::readAllExistingMessages);
+ return reader.thenCompose(reader -> readAllExistingMessages(reader,
false));
Review Comment:
There is another concern. Since `readTailMessages` is running at the
background, we don't have to call `readNextAsync` in another thread. Maybe we
can just call `hasMessageAvailable` in a loop?
##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/TableViewImpl.java:
##########
@@ -270,7 +270,7 @@ private void readAllExistingMessages(Reader<T> reader,
CompletableFuture<Void> f
future.completeExceptionally(ex);
return null;
});
- } else {
+ } else if (readTailMessages){
Review Comment:
```java
} else if (readTailMessages) {
```
Add a space before `{`.
--
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]