liangyepianzhou commented on PR #21166:
URL: https://github.com/apache/pulsar/pull/21166#issuecomment-1720784784

   **Prerequisite:** Since messages are constantly being written into the Topic 
and there is no read-write lock guarantee, we cannot assure the retrieval of 
the most up-to-date value.
   **Implementation Goal:** Record a checkpoint before reading and ensure the 
retrieval of the latest value of the key up to this checkpoint.
   **Use Case:** When read and write operations for a certain key do not occur 
simultaneously, we can refresh the TableView before reading the key to obtain 
the latest value for this key.
   
   Based on the above, I believe it would be more reasonable to introduce an 
asynchronous API `refreshAsync()`. There are two reasons for this:
   * It provides more flexibility for the user.
   * The operation of refresh is easier for users to understand.


-- 
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]

Reply via email to