kgusakov commented on code in PR #4843:
URL: https://github.com/apache/ignite-3/pull/4843#discussion_r1890140913


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/disaster/DisasterRecoveryManager.java:
##########
@@ -337,21 +350,44 @@ public CompletableFuture<Void> resetPartitions(String 
zoneName, String tableName
      * so that a new leader could be elected.
      *
      * @param zoneName Name of the distribution zone. Case-sensitive, without 
quotes.
-     * @param tableId Table id.
+     * @param tableName Fully-qualified table name. Case-sensitive, without 
quotes. Example: "PUBLIC.Foo".
      * @param partitionIds IDs of partitions to reset. If empty, reset all 
zone's partitions.
      * @param manualUpdate Whether the update is triggered manually by user or 
automatically by core logic.
+     * @param triggerRevision Revision of the event, which produce this reset. 
-1 for manual reset.
      * @return Future that completes when partitions are reset.
      */
-    private CompletableFuture<Void> resetPartitions(String zoneName, int 
tableId, Set<Integer> partitionIds, boolean manualUpdate) {
+    private CompletableFuture<Void> resetPartitions(
+            String zoneName, String tableName, Set<Integer> partitionIds, 
boolean manualUpdate, long triggerRevision) {
+        int tableId = tableDescriptor(catalogLatestVersion(), tableName).id();
+
+        return resetPartitions(zoneName, Map.of(tableId, partitionIds), 
manualUpdate, triggerRevision);
+    }
+
+    /**
+     * Updates assignments of the table in a forced manner, allowing for the 
recovery of raft group with lost majorities. It is achieved via
+     * triggering a new rebalance with {@code force} flag enabled in {@link 
Assignments} for partitions where it's required. New pending
+     * assignments with {@code force} flag remove old stable nodes from the 
distribution, and force new Raft configuration via "resetPeers"
+     * so that a new leader could be elected.
+     *
+     * @param zoneName Name of the distribution zone. Case-sensitive, without 
quotes.
+     * @param partitionIds Map of per table partitions' sets to reset. If 
empty, reset all zone's partitions.
+     * @param manualUpdate Whether the update is triggered manually by user or 
automatically by core logic.
+     * @param triggerRevision Revision of the event, which produce this reset. 
-1 for manual reset.
+     * @return Future that completes when partitions are reset.
+     */
+    private CompletableFuture<Void> resetPartitions(

Review Comment:
   Are you really want to add this tab before private?



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