denis-chudov commented on code in PR #5244:
URL: https://github.com/apache/ignite-3/pull/5244#discussion_r1971324627


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2211,14 +2215,14 @@ private CompletableFuture<Void> 
handleChangePendingAssignmentEvent(
             return nullCompletedFuture();
         }
 
-        TablePartitionId replicaGrpId = 
extractTablePartitionId(pendingAssignmentsEntry.key(), 
PENDING_ASSIGNMENTS_PREFIX_BYTES);
+        TablePartitionId replicaGrpId = 
extractTablePartitionId(pendingAssignmentsEntry.key(), 
PENDING_ASSIGNMENTS_QUEUE_PREFIX_BYTES);
 
         // Stable assignments from the meta store, which revision is bounded 
by the current pending event.
         Assignments stableAssignments = 
stableAssignmentsGetLocally(metaStorageMgr, replicaGrpId, revision);
 
         AssignmentsChain assignmentsChain = 
assignmentsChainGetLocally(metaStorageMgr, replicaGrpId, revision);
 
-        Assignments pendingAssignments = 
Assignments.fromBytes(pendingAssignmentsEntry.value());
+        Assignments pendingAssignments = 
AssignmentsQueue.fromBytes(pendingAssignmentsEntry.value()).poll();

Review Comment:
   Yes, now it is clear. I meant that it wasn't before, when the method was 
@Nullable.
   Now it is correct.



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -2211,14 +2215,14 @@ private CompletableFuture<Void> 
handleChangePendingAssignmentEvent(
             return nullCompletedFuture();
         }
 
-        TablePartitionId replicaGrpId = 
extractTablePartitionId(pendingAssignmentsEntry.key(), 
PENDING_ASSIGNMENTS_PREFIX_BYTES);
+        TablePartitionId replicaGrpId = 
extractTablePartitionId(pendingAssignmentsEntry.key(), 
PENDING_ASSIGNMENTS_QUEUE_PREFIX_BYTES);
 
         // Stable assignments from the meta store, which revision is bounded 
by the current pending event.
         Assignments stableAssignments = 
stableAssignmentsGetLocally(metaStorageMgr, replicaGrpId, revision);
 
         AssignmentsChain assignmentsChain = 
assignmentsChainGetLocally(metaStorageMgr, replicaGrpId, revision);
 
-        Assignments pendingAssignments = 
Assignments.fromBytes(pendingAssignmentsEntry.value());
+        Assignments pendingAssignments = 
AssignmentsQueue.fromBytes(pendingAssignmentsEntry.value()).poll();

Review Comment:
   Yes, now it is clear. I meant that it wasn't before, when the method was 
`@Nullable`.
   Now it is correct.



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