tkalkirill commented on code in PR #3352:
URL: https://github.com/apache/ignite-3/pull/3352#discussion_r1513920309


##########
modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/AbstractPageMemoryMvPartitionStorage.java:
##########
@@ -969,4 +977,44 @@ IndexMeta createIndexMetaForNewIndex(int indexId) {
             return sortedIndexes.get(indexId);
         });
     }
+
+    /**
+     * Destroys an index storage identified by the given index ID.
+     *
+     * @param indexId Index ID which storage will be destroyed.
+     * @return Future that will be completed as soon as the storage has been 
destroyed.
+     */
+    public CompletableFuture<Void> destroyIndex(int indexId) {
+        return busy(() -> {
+            throwExceptionIfStorageNotInRunnableState();

Review Comment:
   I will try:
   
   Imagine a situation where rebalancing has begun for some partition and at 
the same time the index destruction starts. Then, when we try to start 
destruction for a rebalancing partition, we will receive an error saying “the 
partition is in a state of rebalancing” and deleting the index will fail with 
an error.
   
   I think in this case, if the partition is in a state of rebalancing, then we 
can start destroying the index for it too, only during a full state transfer we 
need to take this into account. Also, for example, if the partition is in a 
state of cleaning, then we also need to process it somehow correctly.



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