Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BlockBasedIndexPopulator supports parallel threads adding scan batches
Merging is done by multiple threads from an ExecutorService, ideally merging jobs would be passed to JobScheduler but for now that is not available to us. BlockBasedIndexPopulator becomes abstract and implemented by GenericBlockBasedIndexPopulator, because we need to construct specific index reader to be used by DeferredConflictCheckingIndexUpdater. Stop hiding BlockBasedIndexPopulator behind WorkSyncedNativeIndexPopulator, as we can now handle concurrent adds. Merge factor is controlled by FeatureToggle.
- Loading branch information
Showing
6 changed files
with
168 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...nel/src/main/java/org/neo4j/kernel/impl/index/schema/GenericBlockBasedIndexPopulator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (c) 2002-2019 "Neo4j," | ||
* Neo4j Sweden AB [http://neo4j.com] | ||
* | ||
* This file is part of Neo4j. | ||
* | ||
* Neo4j is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.neo4j.kernel.impl.index.schema; | ||
|
||
import java.io.File; | ||
|
||
import org.neo4j.gis.spatial.index.curves.SpaceFillingCurveConfiguration; | ||
import org.neo4j.io.fs.FileSystemAbstraction; | ||
import org.neo4j.io.pagecache.PageCache; | ||
import org.neo4j.kernel.api.index.IndexDirectoryStructure; | ||
import org.neo4j.kernel.api.index.IndexProvider; | ||
import org.neo4j.kernel.impl.index.schema.config.IndexSpecificSpaceFillingCurveSettingsCache; | ||
import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; | ||
|
||
public class GenericBlockBasedIndexPopulator extends BlockBasedIndexPopulator<GenericKey,NativeIndexValue> | ||
{ | ||
private final IndexSpecificSpaceFillingCurveSettingsCache spatialSettings; | ||
private final SpaceFillingCurveConfiguration configuration; | ||
|
||
GenericBlockBasedIndexPopulator( PageCache pageCache, FileSystemAbstraction fs, File file, IndexLayout<GenericKey,NativeIndexValue> layout, | ||
IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings, | ||
IndexDirectoryStructure directoryStructure, SpaceFillingCurveConfiguration configuration, boolean archiveFailedIndex ) | ||
{ | ||
super( pageCache, fs, file, layout, monitor, descriptor, spatialSettings, directoryStructure, archiveFailedIndex ); | ||
this.spatialSettings = spatialSettings; | ||
this.configuration = configuration; | ||
} | ||
|
||
@Override | ||
NativeIndexReader<GenericKey,NativeIndexValue> newReader() | ||
{ | ||
return new GenericNativeIndexReader( tree, layout, descriptor, spatialSettings, configuration ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters