DEADripER commented on code in PR #12840:
URL: https://github.com/apache/ignite/pull/12840#discussion_r2918149110
##########
modules/core/src/main/java/org/apache/ignite/dump/DumpReader.java:
##########
@@ -365,9 +366,19 @@ private static GridKernalContext
standaloneKernalContext(SnapshotFileTree sft, I
private GroupsConfigs groupsConfigs(Dump dump) {
Map<Integer, List<String>> grpsToNodes = new HashMap<>();
List<StoredCacheData> ccfgs = new ArrayList<>();
+ Map<Integer, String> grpIdToName = new HashMap<>();
Set<Integer> grpIds = cfg.groupNames() != null
- ?
Arrays.stream(cfg.groupNames()).map(CU::cacheId).collect(Collectors.toSet())
+ ? Arrays.stream(cfg.groupNames())
+ .map(grpName -> {
+ int grpId = CU.cacheId(grpName);
+
+ if (!grpIdToName.containsKey(grpId))
+ grpIdToName.put(grpId, grpName);
Review Comment:
We try to create mapping from id to names as full as possible. and if we
create DumpReader with some not null grpNames it is better to add them to
mapping. I dont think users will add too many values to DumpReader config so i
think it is not problem to map them all at the beginning. If i'm wrong u can
correct me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]