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;
}
}
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());
}
}
Aggregations