sashapolo commented on code in PR #3352:
URL: https://github.com/apache/ignite-3/pull/3352#discussion_r1514002985
##########
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();
+
+ CompletableFuture<Void> result = nullCompletedFuture();
+
+ PageMemoryHashIndexStorage hashIndexStorage =
hashIndexes.remove(indexId);
+
+ if (hashIndexStorage != null) {
+ assert !sortedIndexes.containsKey(indexId);
Review Comment:
Why is it strange, it's just an assertion to be sure that we don't have some
kind of a bug
--
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]