Mmuzaf commented on a change in pull request #7984:
URL: https://github.com/apache/ignite/pull/7984#discussion_r532832167
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryIndexing.java
##########
@@ -487,4 +493,25 @@ default long indexSize(String schemaName, String tblName,
String idxName) throws
default Map<String, Integer> secondaryIndexesInlineSize() {
return Collections.emptyMap();
}
+
+ /**
+ * Defragment index partition.
+ *
+ * @param grpCtx Old group context.
+ * @param newCtx New group context.
+ * @param partPageMem Partition page memory.
+ * @param mappingByPart Mapping page memory.
+ * @param cpLock Defragmentation checkpoint read lock.
+ * @param log Log.
+ *
+ * @throws IgniteCheckedException If failed.
+ */
+ void defragment(
+ CacheGroupContext grpCtx,
+ CacheGroupContext newCtx,
+ PageMemoryEx partPageMem,
+ IntMap<LinkMap> mappingByPart,
+ CheckpointTimeoutLock cpLock,
Review comment:
Yes. Is it better calling the whole `defragment` method for indexing
under `CachePartitionDefragmentationManager` and remove `cpLock` from the
method parameters?
```
defragmentationCheckpoint.checkpointTimeoutLock().checkpointReadLock();
try {
idx.defragment(
grpCtx,
newCtx,
(PageMemoryEx)partDataRegion.pageMemory(),
mappingByPartition
);
}
finally {
defragmentationCheckpoint.checkpointTimeoutLock().checkpointReadUnlock();
}
```
----------------------------------------------------------------
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:
[email protected]