shishkovilja commented on code in PR #10638:
URL: https://github.com/apache/ignite/pull/10638#discussion_r1206762324


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -1842,10 +1846,18 @@ private static void 
completeListExceptionally(List<PartitionRestoreFuture> col,
      * @param map Map of partitions and cache groups.
      * @return String representation.
      */
-    private static String partitionsMapToString(Map<Integer, Set<Integer>> 
map) {
+    private String partitionsMapToString(Map<Integer, Set<Integer>> map) {
+        Map<Integer, String> cacheGrpNames = new HashMap<>(opCtx.dirs.size());
+
+        opCtx.dirs.forEach(dir -> {
+            String grpName = cacheGroupName(dir);
+            cacheGrpNames.put(GridCacheUtils.cacheId(grpName), grpName);
+        });
+
         return map.entrySet()
             .stream()
-            .collect(Collectors.toMap(Map.Entry::getKey, e -> 
S.toStringSortedDistinct(e.getValue())))
+            .collect(Collectors.toMap(e -> String.format("[grpId=%d, 
grpName=%s]", e.getKey(), cacheGrpNames.get(e.getKey())),
+                e -> GridToStringBuilder.toStringSortedDistinct(e.getValue())))

Review Comment:
   Is it necessary to revert from `S`?



##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java:
##########
@@ -1842,10 +1846,18 @@ private static void 
completeListExceptionally(List<PartitionRestoreFuture> col,
      * @param map Map of partitions and cache groups.
      * @return String representation.
      */
-    private static String partitionsMapToString(Map<Integer, Set<Integer>> 
map) {
+    private String partitionsMapToString(Map<Integer, Set<Integer>> map) {
+        Map<Integer, String> cacheGrpNames = new HashMap<>(opCtx.dirs.size());
+
+        opCtx.dirs.forEach(dir -> {
+            String grpName = cacheGroupName(dir);
+            cacheGrpNames.put(GridCacheUtils.cacheId(grpName), grpName);

Review Comment:
   Is it necessary to rename from `CU`?



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to