gaoran10 commented on a change in pull request #12720:
URL: https://github.com/apache/pulsar/pull/12720#discussion_r749986126
##########
File path:
pulsar-sql/presto-pulsar/src/main/java/org/apache/pulsar/sql/presto/PulsarRecordCursor.java
##########
@@ -278,15 +287,25 @@ public void accept(Entry entry) {
// start time for message
queue read
metricsTracker.start_MESSAGE_QUEUE_ENQUEUE_WAIT_TIME();
- while (true) {
- if
(!haveAvailableCacheSize(
-
messageQueueCacheSizeAllocator, messageQueue)
- ||
!messageQueue.offer(message)) {
- Thread.sleep(1);
- } else {
-
messageQueueCacheSizeAllocator.allocate(
-
message.getData().readableBytes());
- break;
+ if
(message.getNumChunksFromMsg() > 1) {
+ message =
processChunkedMessages(message);
+ } else if
(entryExceedSplitEndPosition(entry)) {
Review comment:
```
# The code block at line 276.
if (entryExceedSplitEndPosition(entry) && chunkedMessagesMap.isEmpty()) {
return;
}
```
If the read position exceeds the split end position and the
chunkedMessagesMap isn't empty, the check at line 292 may be hit. If the entry
exceeds the split end position, we only care about entries that are related to
incomplete chunked messages, the no-chunked messages should be released.
--
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]