Skip to content

Commit

Permalink
[ISSUE #8049] fix tiered store delete empty topic NPE (#8050)
Browse files Browse the repository at this point in the history
Co-authored-by: zhaoyuhan <zhaoyuhan@xiaomi.com>
  • Loading branch information
bxfjb and zhaoyuhan committed May 8, 2024
1 parent 5dae822 commit ad02756
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ public QueueMetadata getQueue(MessageQueue mq) {

@Override
public void iterateQueue(String topic, Consumer<QueueMetadata> callback) {
queueMetadataTable.get(topic).values().forEach(callback);
ConcurrentMap<Integer, QueueMetadata> metadataConcurrentMap = queueMetadataTable.get(topic);
if (metadataConcurrentMap != null) {
metadataConcurrentMap.values().forEach(callback);
}
}

@Override
Expand Down

0 comments on commit ad02756

Please sign in to comment.