Incorrect Facet Count With Large Dataset and ACLs
While backporting to 1.6 branch there were test failure due to missing
code paths added during hybridV2 implementation (1.8). Changed random
seed injection slightly to make it compatible with 1.6 branch as well.
@@ -251,7 +251,8 @@ public abstract class FulltextIndexEditorContext<D> {
private IndexDefinition createIndexDefinition(NodeState root, NodeBuilder definition, IndexingContext
indexingContext, boolean asyncIndexing) {
-
+ NodeState defnState = definition.getBaseState();
+ if (asyncIndexing) {
// A good time to check and see if we want to inject our random
// seed - required due to OAK-7929 but could be useful otherwise too.
Long defRandom = getLongPropertyOrNull(definition.getProperty(PROP_RANDOM_SEED));
@@ -261,8 +262,7 @@ public abstract class FulltextIndexEditorContext<D> {
defRandom = seed;
}
- NodeState defnState = definition.getBaseState();
- if (asyncIndexing && !IndexDefinition.isDisableStoredIndexDefinition()){
+ if (!IndexDefinition.isDisableStoredIndexDefinition()) {
if (definition.getBoolean(PROP_REFRESH_DEFN)) {
definition.removeProperty(PROP_REFRESH_DEFN);
NodeState clonedState = NodeStateCloner.cloneVisibleState(defnState);
@@ -288,6 +288,7 @@ public abstract class FulltextIndexEditorContext<D> {
}
}
}
+ }
return newDefinitionBuilder()
.root(root)
.defn(defnState)
