Skip to content

Conversation

@BewareMyPower
Copy link
Contributor

@BewareMyPower BewareMyPower commented May 27, 2025

Motivation

#422 introduces a regression that hasSoughtByTimestamp_ is never set back to false after the seek operation is done. Then, getLastMessageIdAsync will always be called even if lastDequedMessageId_ is not earliest, which means no messages have been received.

Modifications

  • Check if incomingMessages_ is not empty in case messages are never received by the caller but they are already cached.
  • Update testHasMessageAvailableAfterSeekTimestamp to cover the change
@BewareMyPower BewareMyPower force-pushed the bewaremypower/fix-has-message-available-regression branch from 89432d2 to 8c3bc71 Compare May 28, 2025 09:57
@BewareMyPower BewareMyPower changed the title Reduce unnecessary getLastMessageId RPC in hasMessageAvailable Avoid getLastMessageId RPC when calling hasMessageAvailable after seek by timestamp May 28, 2025
@BewareMyPower BewareMyPower marked this pull request as ready for review May 28, 2025 10:00
@merlimat merlimat merged commit 15e0b00 into apache:main Jun 10, 2025
14 checks passed
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-has-message-available-regression branch June 11, 2025 01:23
BewareMyPower added a commit that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants