Search in sources :

Example 1 with RECOVERY

use of org.neo4j.storageengine.api.TransactionApplicationMode.RECOVERY in project neo4j by neo4j.

the class DefaultRecoverySPI method startRecovery.

@Override
public Visitor<CommittedTransactionRepresentation, Exception> startRecovery() {
    // Calling this method means that recovery is required, tell storage engine about it
    // This method will be called before recovery actually starts and so will ensure that
    // each store is aware that recovery will be performed. At this point all the stores have
    // already started btw.
    // Go and read more at {@link CommonAbstractStore#deleteIdGenerator()}
    storageEngine.prepareForRecoveryRequired();
    transactionsToApply = new TransactionQueue(10_000, (first, last) -> storageEngine.apply(first, RECOVERY));
    recoveryVisitor = new RecoveryVisitor(transactionsToApply);
    return recoveryVisitor;
}
Also used : TransactionIdStore(org.neo4j.kernel.impl.transaction.log.TransactionIdStore) TransactionRepresentation(org.neo4j.kernel.impl.transaction.TransactionRepresentation) LogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore) StorageEngine(org.neo4j.storageengine.api.StorageEngine) LogVersionRepository(org.neo4j.kernel.impl.transaction.log.LogVersionRepository) IOException(java.io.IOException) LogEntryStart(org.neo4j.kernel.impl.transaction.log.entry.LogEntryStart) IOLimiter(org.neo4j.io.pagecache.IOLimiter) TransactionToApply(org.neo4j.kernel.impl.api.TransactionToApply) CommittedTransactionRepresentation(org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation) LogPosition(org.neo4j.kernel.impl.transaction.log.LogPosition) TransactionCursor(org.neo4j.kernel.impl.transaction.log.TransactionCursor) RECOVERY(org.neo4j.storageengine.api.TransactionApplicationMode.RECOVERY) Visitor(org.neo4j.helpers.collection.Visitor) NO_COMMITMENT(org.neo4j.kernel.impl.transaction.log.Commitment.NO_COMMITMENT) TransactionQueue(org.neo4j.kernel.impl.api.TransactionQueue) PhysicalLogFiles(org.neo4j.kernel.impl.transaction.log.PhysicalLogFiles) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) TransactionQueue(org.neo4j.kernel.impl.api.TransactionQueue)

Aggregations

IOException (java.io.IOException)1 Visitor (org.neo4j.helpers.collection.Visitor)1 FileSystemAbstraction (org.neo4j.io.fs.FileSystemAbstraction)1 IOLimiter (org.neo4j.io.pagecache.IOLimiter)1 TransactionQueue (org.neo4j.kernel.impl.api.TransactionQueue)1 TransactionToApply (org.neo4j.kernel.impl.api.TransactionToApply)1 CommittedTransactionRepresentation (org.neo4j.kernel.impl.transaction.CommittedTransactionRepresentation)1 TransactionRepresentation (org.neo4j.kernel.impl.transaction.TransactionRepresentation)1 NO_COMMITMENT (org.neo4j.kernel.impl.transaction.log.Commitment.NO_COMMITMENT)1 LogPosition (org.neo4j.kernel.impl.transaction.log.LogPosition)1 LogVersionRepository (org.neo4j.kernel.impl.transaction.log.LogVersionRepository)1 LogicalTransactionStore (org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore)1 PhysicalLogFiles (org.neo4j.kernel.impl.transaction.log.PhysicalLogFiles)1 TransactionCursor (org.neo4j.kernel.impl.transaction.log.TransactionCursor)1 TransactionIdStore (org.neo4j.kernel.impl.transaction.log.TransactionIdStore)1 LogEntryStart (org.neo4j.kernel.impl.transaction.log.entry.LogEntryStart)1 StorageEngine (org.neo4j.storageengine.api.StorageEngine)1 RECOVERY (org.neo4j.storageengine.api.TransactionApplicationMode.RECOVERY)1