ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] pavlukhin commented on a change in pull request #6770: IGNITE-12061 Fix inline size change.
Date Fri, 16 Aug 2019 08:38:53 GMT
pavlukhin commented on a change in pull request #6770: IGNITE-12061 Fix inline size change.
URL: https://github.com/apache/ignite/pull/6770#discussion_r314626378
 
 

 ##########
 File path: modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
 ##########
 @@ -1063,18 +1064,30 @@ public void removeIndex(Session session, Index h2Idx) {
                 if (idx == targetIdx || (idx instanceof GridH2ProxyIndex &&
                     ((GridH2ProxyIndex)idx).underlyingIndex() == targetIdx)) {
 
-                    idxs.remove(i);
+                    Index idx0 = idxs.remove(i);
 
-                    if (idx instanceof GridH2ProxyIndex &&
+                    if (idx0 instanceof GridH2ProxyIndex &&
                         idx.getSchema().findIndex(session, idx.getName()) != null)
                         database.removeSchemaObject(session, idx);
 
+                    GridCacheContext cctx0 = cacheInfo.cacheContext();
+
+                    if (cctx0 != null && idx0 instanceof GridH2IndexBase) {
+                        cctx0.shared().database().checkpointReadLock();
+
+                        try {
+                            ((GridH2IndexBase)idx0).destroy(rmIndex);
 
 Review comment:
   Why do we need to pass `rmIndex` parameter here? In what cases we expect `rmIndex == false`
here? Can we pass `true` unconditionally?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message