Search in sources :

Example 1 with CheckpointTimeoutLock

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);
}
Also used : CheckpointTimeoutLock(org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock) GridQueryProcessor(org.apache.ignite.internal.processors.query.GridQueryProcessor) IndexProcessor(org.apache.ignite.internal.cache.query.index.IndexProcessor)

Aggregations

IndexProcessor (org.apache.ignite.internal.cache.query.index.IndexProcessor)1 CheckpointTimeoutLock (org.apache.ignite.internal.processors.cache.persistence.checkpoint.CheckpointTimeoutLock)1 GridQueryProcessor (org.apache.ignite.internal.processors.query.GridQueryProcessor)1