vadimkolodingg commented on code in PR #5244:
URL: https://github.com/apache/ignite-3/pull/5244#discussion_r1965607402


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceMinimumRequiredTimeProviderImpl.java:
##########
@@ -250,10 +252,18 @@ private Map<Integer, Integer> tableIdToZoneIdMap(int 
earliestCatalogVersion, int
         return tableIdToZoneIdMap;
     }
 
+    private Map<Integer, Map<Integer, Assignments>> 
readPendingAssignments(long appliedRevision) {
+        return readAssignments(PENDING_ASSIGNMENTS_PREFIX_BYTES, 
appliedRevision, bytes -> AssignmentsQueue.fromBytes(bytes).poll());
+    }
+
+    private Map<Integer, Map<Integer, Assignments>> readAssignments(byte[] 
prefix, long appliedRevision) {
+        return readAssignments(prefix, appliedRevision, 
Assignments::fromBytes);
+    }
+
     /**
      * Reads assignments from the metastorage locally. The resulting map is a 
{@code tableId -> {partitionId -> assignments}} mapping.
      */
-    Map<Integer, Map<Integer, Assignments>> readAssignments(byte[] prefix, 
long appliedRevision) {
+    Map<Integer, Map<Integer, Assignments>> readAssignments(byte[] prefix, 
long appliedRevision, Function<byte[], Assignments> valDeser) {

Review Comment:
   done



##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/AssignmentsTracker.java:
##########
@@ -183,7 +193,8 @@ private WatchListener createPendingAssignmentsListener() {
     private static void handleReceivedAssignments(
             WatchEvent event,
             byte[] assignmentsMetastoreKeyPrefix,
-            Map<ReplicationGroupId, TokenizedAssignments> 
groupIdToAssignmentsMap
+            Map<ReplicationGroupId, TokenizedAssignments> 
groupIdToAssignmentsMap,
+            Function<byte[], Set<Assignment>> deserFunction

Review Comment:
   done



-- 
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