You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Amit Jain (Jira)" <ji...@apache.org> on 2023/01/23 06:29:00 UTC

[jira] [Resolved] (OAK-10048) DocumentStoreIndexerBase#buildFlatFileStore outputs the wrong path when FlatFileSplitter used

     [ https://issues.apache.org/jira/browse/OAK-10048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amit Jain resolved OAK-10048.
-----------------------------
    Fix Version/s: 1.48.0
       Resolution: Fixed

On trunk with https://github.com/apache/jackrabbit-oak/commit/aada6bd4b0888677b850b5ffd151b079507a0851

> DocumentStoreIndexerBase#buildFlatFileStore outputs the wrong path when FlatFileSplitter used
> ---------------------------------------------------------------------------------------------
>
>                 Key: OAK-10048
>                 URL: https://issues.apache.org/jira/browse/OAK-10048
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: oak-run
>            Reporter: Amit Jain
>            Assignee: Amit Jain
>            Priority: Major
>             Fix For: 1.48.0
>
>
> {{DocumentStoreIndexerBase#buildFlatFileStore}} below outputs the first FlatFileStore and its path which is incorrect if the FlatFileSplitter is triggered to split files based on config and index definitions. 
> Also, the buildFlatFileStoreList method always passes false to split but shoud instead use the configuration {{IndexerConfiguration.parallelIndexEnabled()}} to try splitting based on this configuration.
> {{The FlatFileNodeStoreBuilder#buildList}} needs to handle already available split files as well.
> {code:java}
> public FlatFileStore buildFlatFileStore() throws IOException, CommitFailedException {
>         NodeState checkpointedState = indexerSupport.retrieveNodeStateForCheckpoint();
>         Set<String> preferredPathElements = new HashSet<>();
>         Set<IndexDefinition> indexDefinitions = getIndexDefinitions();
>         for (IndexDefinition indexDf : indexDefinitions) {
>             preferredPathElements.addAll(indexDf.getRelativeNodeNames());
>         }
>         Predicate<String> predicate = s -> indexDefinitions.stream().anyMatch(indexDef -> indexDef.getPathFilter().filter(s) != PathFilter.Result.EXCLUDE);
>         FlatFileStore flatFileStore = buildFlatFileStoreList(checkpointedState, null, predicate, preferredPathElements, false, indexDefinitions).get(0);
>         log.info("FlatFileStore built at {}. To use this flatFileStore in a reindex step, set System Property-{} with value {}",
>                 flatFileStore.getFlatFileStorePath(), OAK_INDEXER_SORTED_FILE_PATH, flatFileStore.getFlatFileStorePath());
>         return flatFileStore;
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)