This is an automated email from the ASF dual-hosted git repository.

dinglei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 2c213cf  Wrong lock flag for pull request in orderly consume when 
unlock bug (#175)
2c213cf is described below

commit 2c213cf86303e91cb7ce0a1497662365b2369645
Author: jonnxu <[email protected]>
AuthorDate: Wed Aug 14 10:28:14 2019 +0800

    Wrong lock flag for pull request in orderly consume when unlock bug (#175)
---
 src/consumer/Rebalance.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/consumer/Rebalance.cpp b/src/consumer/Rebalance.cpp
index 549e412..2f73bd1 100644
--- a/src/consumer/Rebalance.cpp
+++ b/src/consumer/Rebalance.cpp
@@ -277,7 +277,7 @@ void Rebalance::unlockAll(bool oneway) {
         PullRequest* pullreq = getPullRequest(mqs[i]);
         if (pullreq) {
           LOG_INFO("unlockBatchMQ success of mq:%s", 
mqs[i].toString().c_str());
-          pullreq->setLocked(true);
+          pullreq->setLocked(false);
         } else {
           LOG_ERROR("unlockBatchMQ fails of mq:%s", mqs[i].toString().c_str());
         }
@@ -311,7 +311,7 @@ void Rebalance::unlock(MQMessageQueue mq) {
       PullRequest* pullreq = getPullRequest(mqs[i]);
       if (pullreq) {
         LOG_INFO("unlock success of mq:%s", mqs[i].toString().c_str());
-        pullreq->setLocked(true);
+        pullreq->setLocked(false);
       } else {
         LOG_ERROR("unlock fails of mq:%s", mqs[i].toString().c_str());
       }

Reply via email to