Skip to content

Commit

Permalink
fix: continue in for loop when releasing an inexistent partition lock
Browse files Browse the repository at this point in the history
  • Loading branch information
fangchengjin committed Mar 15, 2023
1 parent 80abc17 commit 66a047e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consumer/TalosConsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ func (c *TalosConsumer) releasePartitionLock(toReleaseList []int32) {
for _, partitionId := range toReleaseList {
if _, ok := c.partitionFetcherMap[partitionId]; !ok {
c.log.Errorf("partitionFetcher map not contains partition: %d", partitionId)
return
continue
}
c.partitionFetcherMap[partitionId].Unlock()
}
Expand Down
2 changes: 1 addition & 1 deletion consumer/TalosTopicsConsumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ func (c *TalosTopicsConsumer) releasePartitionLock(toReleaseList TopicPartitions
for _, partitionId := range toReleaseList {
if _, ok := c.partitionFetcherMap[partitionId]; !ok {
c.log.Errorf("partitionFetcher map not contains partition: %d", partitionId)
return
continue
}
c.partitionFetcherMap[partitionId].Unlock()
}
Expand Down

0 comments on commit 66a047e

Please sign in to comment.