File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
client/src/main/java/org/apache/rocketmq/client/impl/consumer Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -430,8 +430,10 @@ public void incTryUnlockTimes() {
430430 }
431431
432432 public void fillProcessQueueInfo (final ProcessQueueInfo info ) {
433+ boolean lockAcquired = false ;
433434 try {
434435 this .treeMapLock .readLock ().lockInterruptibly ();
436+ lockAcquired = true ;
435437
436438 if (!this .msgTreeMap .isEmpty ()) {
437439 info .setCachedMsgMinOffset (this .msgTreeMap .firstKey ());
@@ -454,8 +456,11 @@ public void fillProcessQueueInfo(final ProcessQueueInfo info) {
454456 info .setLastPullTimestamp (this .lastPullTimestamp );
455457 info .setLastConsumeTimestamp (this .lastConsumeTimestamp );
456458 } catch (Exception e ) {
459+ log .error ("fillProcessQueueInfo exception" , e );
457460 } finally {
458- this .treeMapLock .readLock ().unlock ();
461+ if (lockAcquired ) {
462+ this .treeMapLock .readLock ().unlock ();
463+ }
459464 }
460465 }
461466
You can’t perform that action at this time.
0 commit comments