Search in sources :

Example 1 with LogPruneStrategyFactory

use of org.neo4j.kernel.impl.transaction.log.pruning.LogPruneStrategyFactory in project neo4j by neo4j.

the class Database method buildTransactionLogs.

private DatabaseTransactionLogModule buildTransactionLogs(LogFiles logFiles, Config config, LogProvider logProvider, JobScheduler scheduler, CheckPointerImpl.ForceOperation forceOperation, LogEntryReader logEntryReader, MetadataProvider metadataProvider, Monitors monitors, Dependencies databaseDependencies) {
    TransactionMetadataCache transactionMetadataCache = new TransactionMetadataCache();
    final LogPruning logPruning = new LogPruningImpl(fs, logFiles, logProvider, new LogPruneStrategyFactory(), clock, config);
    final LogRotation logRotation = transactionLogRotation(logFiles, clock, databaseHealth, monitors.newMonitor(LogRotationMonitor.class));
    final BatchingTransactionAppender appender = life.add(new BatchingTransactionAppender(logFiles, logRotation, transactionMetadataCache, metadataProvider, databaseHealth));
    final LogicalTransactionStore logicalTransactionStore = new PhysicalLogicalTransactionStore(logFiles, transactionMetadataCache, logEntryReader, monitors, true);
    CheckPointThreshold threshold = CheckPointThreshold.createThreshold(config, clock, logPruning, logProvider);
    var checkpointAppender = logFiles.getCheckpointFile().getCheckpointAppender();
    final CheckPointerImpl checkPointer = new CheckPointerImpl(metadataProvider, threshold, forceOperation, logPruning, checkpointAppender, databaseHealth, logProvider, tracers, ioController, storeCopyCheckPointMutex, versionContextSupplier, clock);
    long recurringPeriod = threshold.checkFrequencyMillis();
    CheckPointScheduler checkPointScheduler = new CheckPointScheduler(checkPointer, ioController, scheduler, recurringPeriod, databaseHealth, namedDatabaseId.name());
    life.add(checkPointer);
    life.add(checkPointScheduler);
    databaseDependencies.satisfyDependencies(checkPointer, logFiles, logicalTransactionStore, logRotation, appender);
    return new DatabaseTransactionLogModule(checkPointer, appender);
}
Also used : PhysicalLogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore) CheckPointerImpl(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointerImpl) LogPruningImpl(org.neo4j.kernel.impl.transaction.log.pruning.LogPruningImpl) LogRotationMonitor(org.neo4j.kernel.impl.transaction.log.rotation.monitor.LogRotationMonitor) BatchingTransactionAppender(org.neo4j.kernel.impl.transaction.log.BatchingTransactionAppender) TransactionMetadataCache(org.neo4j.kernel.impl.transaction.log.TransactionMetadataCache) PhysicalLogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore) LogicalTransactionStore(org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore) CheckPointScheduler(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointScheduler) LogPruning(org.neo4j.kernel.impl.transaction.log.pruning.LogPruning) LogPruneStrategyFactory(org.neo4j.kernel.impl.transaction.log.pruning.LogPruneStrategyFactory) CheckPointThreshold(org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointThreshold) LogRotation(org.neo4j.kernel.impl.transaction.log.rotation.LogRotation) FileLogRotation.transactionLogRotation(org.neo4j.kernel.impl.transaction.log.rotation.FileLogRotation.transactionLogRotation)

Aggregations

BatchingTransactionAppender (org.neo4j.kernel.impl.transaction.log.BatchingTransactionAppender)1 LogicalTransactionStore (org.neo4j.kernel.impl.transaction.log.LogicalTransactionStore)1 PhysicalLogicalTransactionStore (org.neo4j.kernel.impl.transaction.log.PhysicalLogicalTransactionStore)1 TransactionMetadataCache (org.neo4j.kernel.impl.transaction.log.TransactionMetadataCache)1 CheckPointScheduler (org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointScheduler)1 CheckPointThreshold (org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointThreshold)1 CheckPointerImpl (org.neo4j.kernel.impl.transaction.log.checkpoint.CheckPointerImpl)1 LogPruneStrategyFactory (org.neo4j.kernel.impl.transaction.log.pruning.LogPruneStrategyFactory)1 LogPruning (org.neo4j.kernel.impl.transaction.log.pruning.LogPruning)1 LogPruningImpl (org.neo4j.kernel.impl.transaction.log.pruning.LogPruningImpl)1 FileLogRotation.transactionLogRotation (org.neo4j.kernel.impl.transaction.log.rotation.FileLogRotation.transactionLogRotation)1 LogRotation (org.neo4j.kernel.impl.transaction.log.rotation.LogRotation)1 LogRotationMonitor (org.neo4j.kernel.impl.transaction.log.rotation.monitor.LogRotationMonitor)1