Skip to content

Commit

Permalink
Fix: Nacos snapshot config NPE (#3831)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruansheng8 authored Aug 23, 2024
1 parent 5f9e76b commit c637544
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,13 @@ public static void putConfigSnapshot(String dataId, String group, String configI
iterator.next();
iterator.remove();
}
CONFIG_INFO_SNAPSHOT_MAP.put(formatConfigSnapshotKey(dataId, group),
configInfo);
String snapshotKey = formatConfigSnapshotKey(dataId, group);
if (configInfo == null) {
CONFIG_INFO_SNAPSHOT_MAP.remove(snapshotKey);
}
else {
CONFIG_INFO_SNAPSHOT_MAP.put(snapshotKey, configInfo);
}
}
catch (Exception e) {
log.warn("remove nacos config snapshot error", e);
Expand Down

0 comments on commit c637544

Please sign in to comment.