Search in sources :

Example 1 with TxLog

use of org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog in project ignite by apache.

the class MvccProcessorImpl method afterBinaryMemoryRestore.

/**
 * {@inheritDoc}
 */
@Override
public void afterBinaryMemoryRestore(IgniteCacheDatabaseSharedManager mgr, GridCacheDatabaseSharedManager.RestoreBinaryState restoreState) throws IgniteCheckedException {
    boolean hasMvccCaches = ctx.cache().persistentCaches().stream().anyMatch(c -> c.cacheConfiguration().getAtomicityMode() == TRANSACTIONAL_SNAPSHOT);
    if (hasMvccCaches) {
        txLog = new TxLog(ctx, mgr);
        mvccEnabled = true;
    }
}
Also used : TxLog(org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog)

Example 2 with TxLog

use of org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog in project ignite by apache.

the class CacheMvccVacuumTest method ensureVacuum.

/**
 * Ensures vacuum is running on the given node.
 *
 * @param node Node.
 */
private void ensureVacuum(Ignite node) {
    MvccProcessorImpl crd = mvccProcessor(node);
    assertNotNull(crd);
    TxLog txLog = GridTestUtils.getFieldValue(crd, "txLog");
    assertNotNull("TxLog wasn't initialized.", txLog);
    List<GridWorker> vacuumWorkers = GridTestUtils.getFieldValue(crd, "vacuumWorkers");
    assertNotNull("No vacuum workers was initialized.", vacuumWorkers);
    assertFalse("No vacuum workers was initialized.", vacuumWorkers.isEmpty());
    for (GridWorker w : vacuumWorkers) {
        assertFalse(w.isCancelled());
        assertFalse(w.isDone());
    }
}
Also used : TxLog(org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog) GridWorker(org.apache.ignite.internal.util.worker.GridWorker)

Aggregations

TxLog (org.apache.ignite.internal.processors.cache.mvcc.txlog.TxLog)2 GridWorker (org.apache.ignite.internal.util.worker.GridWorker)1