timoninmaxim commented on a change in pull request #9780:
URL: https://github.com/apache/ignite/pull/9780#discussion_r795827730



##########
File path: 
modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
##########
@@ -988,6 +988,8 @@ public void rollbackUserIndex(String idxName) {
             GridH2IndexBase rmvIdx = tmpIdxs.remove(idxName);
 
             assert rmvIdx != null;
+
+            rmvIdx.destroy(true);

Review comment:
       I think there is yet another case. I'm not sure, but it could be a 
situation when orphaned indexes appears after dropping a _table_ but related 
table cache remains. Then we need check such indexes on table creation too.
   
   If I understand correctly, it's required to do:
   1. Try destroy index on the closure failure. In case of destroying fails, 
Ignite should WARN user about orphaned index. Then user can destroy it manually 
with special command.
   2. Check for orphaned indexes on table creation, due to conflicts with 
orphaned indexes after deletion tables in past.
   3. Check that all indexes are present on table start, and if no then check 
orphaned indexes and destroy them. Then full rebuild index started (after node 
recovery).
   4. Destroy index on cache stop, in case of concurrent start table and delete 
cache. 
   
   Please correct me, if I miss smth. 
   
   I can pick this cases up in separate ticket, or you can do it within this 
ticket. I have a ticket with concurrent index rebuilding and IndexQuery 
running, so I've been going to work within this code in near time anyway.
   
   WDYT?




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