Search in sources :

Example 1 with LogsUpgrader

use of org.neo4j.kernel.impl.storemigration.LogsUpgrader in project neo4j by neo4j.

the class StoreUpgraderInterruptionTestIT method newUpgrader.

private StoreUpgrader newUpgrader(StoreVersionCheck versionCheck, MigrationProgressMonitor progressMonitor, StoreMigrationParticipant... participants) {
    Config config = Config.defaults(allow_upgrade, true);
    Dependencies dependencies = new Dependencies();
    dependencies.satisfyDependencies(new Monitors());
    RecordStorageEngineFactory storageEngineFactory = new RecordStorageEngineFactory();
    var databaseHealth = new DatabaseHealth(PanicEventGenerator.NO_OP, NullLog.getInstance());
    LogsUpgrader logsUpgrader = new LogsUpgrader(fs, storageEngineFactory, workingDatabaseLayout, pageCache, legacyTransactionLogsLocator, config, dependencies, NULL, INSTANCE, databaseHealth, false);
    StoreUpgrader upgrader = new StoreUpgrader(versionCheck, progressMonitor, config, fs, NullLogProvider.getInstance(), logsUpgrader, NULL);
    for (StoreMigrationParticipant participant : participants) {
        upgrader.addParticipant(participant);
    }
    return upgrader;
}
Also used : DatabaseHealth(org.neo4j.monitoring.DatabaseHealth) RecordStorageEngineFactory(org.neo4j.internal.recordstorage.RecordStorageEngineFactory) LogsUpgrader(org.neo4j.kernel.impl.storemigration.LogsUpgrader) Config(org.neo4j.configuration.Config) StoreMigrationParticipant(org.neo4j.storageengine.migration.StoreMigrationParticipant) Monitors(org.neo4j.monitoring.Monitors) Dependencies(org.neo4j.collection.Dependencies) StoreUpgrader(org.neo4j.kernel.impl.storemigration.StoreUpgrader)

Aggregations

Dependencies (org.neo4j.collection.Dependencies)1 Config (org.neo4j.configuration.Config)1 RecordStorageEngineFactory (org.neo4j.internal.recordstorage.RecordStorageEngineFactory)1 LogsUpgrader (org.neo4j.kernel.impl.storemigration.LogsUpgrader)1 StoreUpgrader (org.neo4j.kernel.impl.storemigration.StoreUpgrader)1 DatabaseHealth (org.neo4j.monitoring.DatabaseHealth)1 Monitors (org.neo4j.monitoring.Monitors)1 StoreMigrationParticipant (org.neo4j.storageengine.migration.StoreMigrationParticipant)1