You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/01/31 11:49:41 UTC
[GitHub] [ignite] timoninmaxim commented on a change in pull request #9780: IGNITE-16426 Add tests for known scenarios that lead to index corruption.
timoninmaxim commented on a change in pull request #9780:
URL: https://github.com/apache/ignite/pull/9780#discussion_r795594092
##########
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:
Indexes creation is part of `SchemaManager#createIndex`:
```
final GridH2IndexBase h2Idx = desc.createUserIndex(idxDesc, cacheVisitor);
```
This method `rollbackUserIndex` is executed iff a SQL query statement fails (try-catch block). But test halts and failes earlier in `desc.createUserIndex`.
Then, index isn't registered in table due to an exception in `FailBuildIndexConsumer`, and then it becomes an orphaned index. There is a method `IndexProcessor#destroyOrphanIndex` for such indexes. I see that it actually uses only by special command, but maybe it's possible to reuse this metod and clean such indexes on cache stop.
WDYT?
, and also not cleaned along with tables in moment of a cache stop. It looks like 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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org