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


##########
modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceUtil.java:
##########
@@ -465,19 +464,19 @@ public static CompletableFuture<Set<Assignment>> 
partitionAssignments(
     }
 
     /**
-     * Returns partition assignments from vault.
+     * Returns partition assignments from meta storage locally.
      *
-     * @param vaultManager Vault manager.
+     * @param metaStorageManager Meta storage manager.
      * @param tableId Table id.
      * @param partitionNumber Partition number.
-     * @return Returns partition assignments from vault or {@code null} if 
assignments is absent.
+     * @param revision Revision.
+     * @return Returns partition assignments from meta storage locally or 
{@code null} if assignments is absent.
      */
     public static Set<Assignment> partitionAssignments(
-            VaultManager vaultManager, int tableId, int partitionNumber) {
-        VaultEntry entry =
-                vaultManager.get(stablePartAssignmentsKey(new 
TablePartitionId(tableId, partitionNumber))).join();
+            MetaStorageManager metaStorageManager, int tableId, int 
partitionNumber, long revision) {
+        Entry entry = 
metaStorageManager.getLocally(stablePartAssignmentsKey(new 
TablePartitionId(tableId, partitionNumber)), revision);
 
-        return (entry == null) ? null : ByteUtils.fromBytes(entry.value());
+        return (entry == null || entry.empty() || entry.tombstone()) ? null : 
ByteUtils.fromBytes(entry.value());

Review Comment:
   fixed



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

Reply via email to