jalesys commented on a change in pull request #300: fix: offset store read 
missing fallthrough for _ReadMemoryThenStore
URL: https://github.com/apache/rocketmq-client-go/pull/300#discussion_r347408353
 
 

 ##########
 File path: consumer/offset_store.go
 ##########
 @@ -277,14 +278,16 @@ func (r *remoteBrokerOffsetStore) read(mq 
*primitive.MessageQueue, t readType) i
        r.mutex.RLock()
        switch t {
        case _ReadFromMemory, _ReadMemoryThenStore:
-               defer r.mutex.RUnlock()
                off, exist := r.OffsetTable[*mq]
                if exist {
+                       r.mutex.RUnlock()
 
 Review comment:
    `defer` wound `RUnlock ` an Unlocked  mutex at the end of case block.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to