Skip to content

Commit

Permalink
Move responsibility for lucene label scan directory to schema index m…
Browse files Browse the repository at this point in the history
…igrator
  • Loading branch information
burqen committed Jul 25, 2017
1 parent 99e7f48 commit 1b372d6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 34 deletions.

This file was deleted.

Expand Up @@ -24,7 +24,6 @@

import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.api.index.SchemaIndexProvider;
import org.neo4j.kernel.impl.index.labelscan.LuceneLabelScanDirectory;
import org.neo4j.kernel.impl.store.format.CapabilityType;
import org.neo4j.kernel.impl.store.format.RecordFormatSelector;
import org.neo4j.kernel.impl.store.format.RecordFormats;
Expand Down Expand Up @@ -71,11 +70,16 @@ public void moveMigratedFiles( File migrationDir, File storeDir, String versionT
{
deleteIndexes( schemaIndexDirectory );
}
deleteIndexes( LuceneLabelScanDirectory.getLuceneStoreDirectory( storeDir ) );
deleteIndexes( getLuceneStoreDirectory( storeDir ) );
}

private void deleteIndexes( File indexRootDirectory ) throws IOException
{
fileSystem.deleteRecursively( indexRootDirectory );
}

static File getLuceneStoreDirectory( File storeRootDir )
{
return new File( new File( new File( storeRootDir, "schema" ), "label" ), "lucene" );
}
}
Expand Up @@ -26,7 +26,6 @@

import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.api.index.SchemaIndexProvider;
import org.neo4j.kernel.impl.index.labelscan.LuceneLabelScanDirectory;
import org.neo4j.kernel.impl.store.format.standard.StandardV2_3;
import org.neo4j.kernel.impl.store.format.standard.StandardV3_0;
import org.neo4j.kernel.impl.storemigration.monitoring.MigrationProgressMonitor;
Expand Down Expand Up @@ -57,6 +56,6 @@ public void schemaAndLabelIndexesRemovedAfterSuccessfulMigration() throws IOExce
migrator.moveMigratedFiles( migrationDir, storeDir, StandardV2_3.STORE_VERSION, StandardV3_0.STORE_VERSION );

verify( fs ).deleteRecursively( schemaIndexProvider.getSchemaIndexStoreDirectory( storeDir ) );
verify( fs ).deleteRecursively( LuceneLabelScanDirectory.getLuceneStoreDirectory( storeDir ) );
verify( fs ).deleteRecursively( SchemaIndexMigrator.getLuceneStoreDirectory( storeDir ) );
}
}

0 comments on commit 1b372d6

Please sign in to comment.