Skip to content

Commit

Permalink
Revert "Merge pull request #9872 from phughk/3.2-backupRaft"
Browse files Browse the repository at this point in the history
This reverts commit 46d0289, reversing
changes made to 48c0290.
  • Loading branch information
phughk committed Sep 29, 2017
1 parent 216d741 commit d36c869
Show file tree
Hide file tree
Showing 110 changed files with 1,289 additions and 4,470 deletions.
Expand Up @@ -33,7 +33,7 @@
import org.neo4j.commandline.arguments.Arguments;
import org.neo4j.commandline.arguments.OptionalBooleanArg;
import org.neo4j.commandline.arguments.common.OptionalCanonicalPath;
import org.neo4j.consistency.checking.full.ConsistencyFlags;
import org.neo4j.consistency.checking.full.CheckConsistencyConfig;
import org.neo4j.consistency.checking.full.ConsistencyCheckIncompleteException;
import org.neo4j.dbms.DatabaseManagementSystemSettings;
import org.neo4j.helpers.Strings;
Expand Down Expand Up @@ -185,7 +185,7 @@ public void execute( String[] args ) throws IncorrectUsage, CommandFailed
.runFullConsistencyCheck( storeDir, config, ProgressMonitorFactory.textual( System.err ),
FormattedLogProvider.toOutputStream( System.out ), fileSystem, verbose,
reportDir.toFile(),
new ConsistencyFlags(
new CheckConsistencyConfig(
checkGraph, checkIndexes, checkLabelScanStore, checkPropertyOwners ) );

if ( !consistencyCheckResult.isSuccessful() )
Expand Down
Expand Up @@ -25,7 +25,7 @@
import java.text.SimpleDateFormat;
import java.util.Date;

import org.neo4j.consistency.checking.full.ConsistencyFlags;
import org.neo4j.consistency.checking.full.CheckConsistencyConfig;
import org.neo4j.consistency.checking.full.ConsistencyCheckIncompleteException;
import org.neo4j.consistency.checking.full.FullCheck;
import org.neo4j.consistency.report.ConsistencySummaryStatistics;
Expand Down Expand Up @@ -98,18 +98,18 @@ public Result runFullConsistencyCheck( File storeDir, Config tuningConfiguration
throws ConsistencyCheckIncompleteException, IOException
{
return runFullConsistencyCheck( storeDir, tuningConfiguration, progressFactory, logProvider, verbose,
new ConsistencyFlags(tuningConfiguration) );
new CheckConsistencyConfig(tuningConfiguration) );
}

public Result runFullConsistencyCheck( File storeDir, Config config, ProgressMonitorFactory progressFactory,
LogProvider logProvider, boolean verbose, ConsistencyFlags consistencyFlags )
LogProvider logProvider, boolean verbose, CheckConsistencyConfig checkConsistencyConfig )
throws ConsistencyCheckIncompleteException, IOException
{
FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction();
try
{
return runFullConsistencyCheck( storeDir, config, progressFactory, logProvider,
fileSystem, verbose, consistencyFlags );
fileSystem, verbose, checkConsistencyConfig );
}
finally
{
Expand All @@ -131,15 +131,15 @@ public Result runFullConsistencyCheck( File storeDir, Config tuningConfiguration
boolean verbose ) throws ConsistencyCheckIncompleteException, IOException
{
return runFullConsistencyCheck( storeDir, tuningConfiguration, progressFactory, logProvider, fileSystem,
verbose, new ConsistencyFlags(tuningConfiguration) );
verbose, new CheckConsistencyConfig(tuningConfiguration) );
}

public Result runFullConsistencyCheck( File storeDir, Config config, ProgressMonitorFactory progressFactory,
LogProvider logProvider, FileSystemAbstraction fileSystem, boolean verbose,
ConsistencyFlags consistencyFlags ) throws ConsistencyCheckIncompleteException, IOException
CheckConsistencyConfig checkConsistencyConfig ) throws ConsistencyCheckIncompleteException, IOException
{
return runFullConsistencyCheck( storeDir, config, progressFactory, logProvider, fileSystem,
verbose, defaultReportDir( config, storeDir ), consistencyFlags );
verbose, defaultReportDir( config, storeDir ), checkConsistencyConfig );
}

@Deprecated
Expand All @@ -148,12 +148,12 @@ public Result runFullConsistencyCheck( File storeDir, Config tuningConfiguration
boolean verbose, File reportDir ) throws ConsistencyCheckIncompleteException, IOException
{
return runFullConsistencyCheck( storeDir, tuningConfiguration, progressFactory, logProvider, fileSystem,
verbose, reportDir, new ConsistencyFlags(tuningConfiguration ) );
verbose, reportDir, new CheckConsistencyConfig(tuningConfiguration ) );
}

public Result runFullConsistencyCheck( File storeDir, Config config, ProgressMonitorFactory progressFactory,
LogProvider logProvider, FileSystemAbstraction fileSystem, boolean verbose, File reportDir,
ConsistencyFlags consistencyFlags ) throws ConsistencyCheckIncompleteException, IOException
CheckConsistencyConfig checkConsistencyConfig ) throws ConsistencyCheckIncompleteException, IOException
{
Log log = logProvider.getLog( getClass() );
ConfiguringPageCacheFactory pageCacheFactory = new ConfiguringPageCacheFactory(
Expand All @@ -164,7 +164,7 @@ public Result runFullConsistencyCheck( File storeDir, Config config, ProgressMon
try
{
return runFullConsistencyCheck( storeDir, config, progressFactory, logProvider, fileSystem,
pageCache, verbose, reportDir, consistencyFlags );
pageCache, verbose, reportDir, checkConsistencyConfig );
}
finally
{
Expand All @@ -186,16 +186,16 @@ public Result runFullConsistencyCheck( final File storeDir, Config tuningConfigu
throws ConsistencyCheckIncompleteException
{
return runFullConsistencyCheck( storeDir, tuningConfiguration, progressFactory, logProvider, fileSystem,
pageCache, verbose, new ConsistencyFlags(tuningConfiguration ) );
pageCache, verbose, new CheckConsistencyConfig(tuningConfiguration ) );
}

public Result runFullConsistencyCheck( final File storeDir, Config config, ProgressMonitorFactory progressFactory,
final LogProvider logProvider, final FileSystemAbstraction fileSystem, final PageCache pageCache,
final boolean verbose, ConsistencyFlags consistencyFlags )
final boolean verbose, CheckConsistencyConfig checkConsistencyConfig )
throws ConsistencyCheckIncompleteException
{
return runFullConsistencyCheck( storeDir, config, progressFactory, logProvider, fileSystem, pageCache,
verbose, defaultReportDir( config, storeDir ), consistencyFlags );
verbose, defaultReportDir( config, storeDir ), checkConsistencyConfig );
}

@Deprecated
Expand All @@ -205,12 +205,12 @@ public Result runFullConsistencyCheck( final File storeDir, Config tuningConfigu
throws ConsistencyCheckIncompleteException
{
return runFullConsistencyCheck( storeDir, tuningConfiguration, progressFactory, logProvider, fileSystem,
pageCache, verbose, reportDir, new ConsistencyFlags(tuningConfiguration) );
pageCache, verbose, reportDir, new CheckConsistencyConfig(tuningConfiguration) );
}

public Result runFullConsistencyCheck( final File storeDir, Config config, ProgressMonitorFactory progressFactory,
final LogProvider logProvider, final FileSystemAbstraction fileSystem, final PageCache pageCache,
final boolean verbose, File reportDir, ConsistencyFlags consistencyFlags )
final boolean verbose, File reportDir, CheckConsistencyConfig checkConsistencyConfig )
throws ConsistencyCheckIncompleteException
{
Log log = logProvider.getLog( getClass() );
Expand Down Expand Up @@ -267,7 +267,7 @@ public Result runFullConsistencyCheck( final File storeDir, Config config, Progr
}
storeAccess.initialize();
DirectStoreAccess stores = new DirectStoreAccess( storeAccess, labelScanStore, indexes );
FullCheck check = new FullCheck( progressFactory, statistics, numberOfThreads, consistencyFlags );
FullCheck check = new FullCheck( progressFactory, statistics, numberOfThreads, checkConsistencyConfig );
summary = check.execute( stores, new DuplicatingLog( log, reportLog ) );
}
finally
Expand Down
Expand Up @@ -25,7 +25,7 @@
import java.util.List;
import java.util.Map;

import org.neo4j.consistency.checking.full.ConsistencyFlags;
import org.neo4j.consistency.checking.full.CheckConsistencyConfig;
import org.neo4j.consistency.checking.full.ConsistencyCheckIncompleteException;
import org.neo4j.helpers.Args;
import org.neo4j.helpers.Strings;
Expand Down Expand Up @@ -112,7 +112,7 @@ ConsistencyCheckService.Result run( String... args ) throws ToolFailureException
try
{
return consistencyCheckService.runFullConsistencyCheck( storeDir, tuningConfiguration,
ProgressMonitorFactory.textual( System.err ), logProvider, fs, verbose, new ConsistencyFlags(tuningConfiguration) );
ProgressMonitorFactory.textual( System.err ), logProvider, fs, verbose, new CheckConsistencyConfig(tuningConfiguration) );
}
catch ( ConsistencyCheckIncompleteException e )
{
Expand Down
Expand Up @@ -25,22 +25,22 @@
import org.neo4j.consistency.ConsistencyCheckSettings;
import org.neo4j.kernel.configuration.Config;

public class ConsistencyFlags
public class CheckConsistencyConfig
{
private final boolean checkGraph;
private final boolean checkIndexes;
private final boolean checkLabelScanStore;
private final boolean checkPropertyOwners;

public ConsistencyFlags( Config tuningConfiguration )
public CheckConsistencyConfig( Config tuningConfiguration )
{
this( tuningConfiguration.get( ConsistencyCheckSettings.consistency_check_graph ),
tuningConfiguration.get( ConsistencyCheckSettings.consistency_check_indexes ),
tuningConfiguration.get( ConsistencyCheckSettings.consistency_check_label_scan_store ),
tuningConfiguration.get( ConsistencyCheckSettings.consistency_check_property_owners ) );
}

public ConsistencyFlags( boolean checkGraph,
public CheckConsistencyConfig( boolean checkGraph,
boolean checkIndexes,
boolean checkLabelScanStore,
boolean checkPropertyOwners )
Expand Down
Expand Up @@ -66,20 +66,20 @@ public class FullCheck
public FullCheck( Config tuningConfiguration, ProgressMonitorFactory progressFactory,
Statistics statistics, int threads )
{
this(progressFactory, statistics, threads, new ConsistencyFlags(tuningConfiguration) );
this(progressFactory, statistics, threads, new CheckConsistencyConfig(tuningConfiguration) );
}

public FullCheck( ProgressMonitorFactory progressFactory, Statistics statistics, int threads,
ConsistencyFlags consistencyFlags )
CheckConsistencyConfig checkConsistencyConfig )
{
this.statistics = statistics;
this.threads = threads;
this.progressFactory = progressFactory;
this.samplingConfig = new IndexSamplingConfig( Config.embeddedDefaults() );
this.checkGraph = consistencyFlags.isCheckGraph();
this.checkIndexes = consistencyFlags.isCheckIndexes();
this.checkLabelScanStore = consistencyFlags.isCheckLabelScanStore();
this.checkPropertyOwners = consistencyFlags.isCheckPropertyOwners();
this.checkGraph = checkConsistencyConfig.isCheckGraph();
this.checkIndexes = checkConsistencyConfig.isCheckIndexes();
this.checkLabelScanStore = checkConsistencyConfig.isCheckLabelScanStore();
this.checkPropertyOwners = checkConsistencyConfig.isCheckPropertyOwners();
}

public ConsistencySummaryStatistics execute( DirectStoreAccess stores, Log log )
Expand Down

0 comments on commit d36c869

Please sign in to comment.