This is an automated email from the ASF dual-hosted git repository.
lizhimin pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push:
new 860de80261 [ISSUE #10183] Fix incorrect brokerName when constructing
processQueueTable with static topic (#10186)
860de80261 is described below
commit 860de802612da9f510e4ea6e9e33d1631c90b88e
Author: wizcraft_kris <[email protected]>
AuthorDate: Fri Apr 3 11:05:37 2026 +0800
[ISSUE #10183] Fix incorrect brokerName when constructing processQueueTable
with static topic (#10186)
---
.../org/apache/rocketmq/client/impl/consumer/ProcessQueue.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
index bc1b5eff2f..a0387b5c1c 100644
---
a/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
+++
b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
@@ -430,8 +430,10 @@ public class ProcessQueue {
}
public void fillProcessQueueInfo(final ProcessQueueInfo info) {
+ boolean lockAcquired = false;
try {
this.treeMapLock.readLock().lockInterruptibly();
+ lockAcquired = true;
if (!this.msgTreeMap.isEmpty()) {
info.setCachedMsgMinOffset(this.msgTreeMap.firstKey());
@@ -454,8 +456,11 @@ public class ProcessQueue {
info.setLastPullTimestamp(this.lastPullTimestamp);
info.setLastConsumeTimestamp(this.lastConsumeTimestamp);
} catch (Exception e) {
+ log.error("fillProcessQueueInfo exception", e);
} finally {
- this.treeMapLock.readLock().unlock();
+ if (lockAcquired) {
+ this.treeMapLock.readLock().unlock();
+ }
}
}