You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/15 09:12:27 UTC

[GitHub] [pulsar] coderzc commented on a diff in pull request #16969: [refactor][client c++] Delete PartitionedConsumerImpl, use MultiTopicsConsumerImpl instead

coderzc commented on code in PR #16969:
URL: https://github.com/apache/pulsar/pull/16969#discussion_r945552304


##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.cc:
##########
@@ -712,7 +738,19 @@ void MultiTopicsConsumerImpl::seekAsync(const MessageId& msgId, ResultCallback c
 }
 
 void MultiTopicsConsumerImpl::seekAsync(uint64_t timestamp, ResultCallback callback) {
-    callback(ResultOperationNotSupported);
+    Lock stateLock(mutex_);
+    if (state_ != Ready) {
+        stateLock.unlock();
+        callback(ResultAlreadyClosed);
+        return;
+    }
+    // consumers_ could only be modified when state_ is Ready, so we needn't lock consumersMutex_ here

Review Comment:
   Please rebase master and remove stateLock.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org