use of org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock in project ignite by apache.
the class CachePartitionDefragmentationManager method defragmentIndexPartition.
/**
* Defragmentate indexing partition.
*
* @param grpCtx
*
* @throws IgniteCheckedException If failed.
*/
private void defragmentIndexPartition(CacheGroupContext grpCtx, CacheGroupContext newCtx) throws IgniteCheckedException {
GridQueryProcessor query = grpCtx.caches().get(0).kernalContext().query();
if (!query.moduleEnabled())
return;
IndexProcessor idx = grpCtx.caches().get(0).kernalContext().indexProcessor();
CheckpointTimeoutLock cpLock = defragmentationCheckpoint.checkpointTimeoutLock();
Runnable cancellationChecker = this::checkCancellation;
idx.defragment(grpCtx, newCtx, (PageMemoryEx) partDataRegion.pageMemory(), linkMapByPart, cpLock, cancellationChecker, defragmentationThreadPool);
}
Aggregations