nfsantos commented on code in PR #2031:
URL: https://github.com/apache/jackrabbit-oak/pull/2031#discussion_r1958271472
##########
oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/writer/DefaultIndexWriterFactory.java:
##########
@@ -50,14 +64,30 @@ public LuceneIndexWriter newInstance(IndexDefinition def,
NodeBuilder definition
"Expected %s but found %s for index definition",
LuceneIndexDefinition.class, def.getClass());
- LuceneIndexDefinition definition = (LuceneIndexDefinition)def;
+ LuceneIndexDefinition definition = (LuceneIndexDefinition) def;
- if (mountInfoProvider.hasNonDefaultMounts()){
- return new MultiplexingIndexWriter(directoryFactory,
mountInfoProvider, definition,
- definitionBuilder, reindex, writerConfig);
+ if (mountInfoProvider.hasNonDefaultMounts()) {
+ return wrapWithPipelinedIndexWriter(
+ new MultiplexingIndexWriter(directoryFactory,
mountInfoProvider, definition, definitionBuilder, reindex, writerConfig),
+ definition.getIndexName());
}
- return new DefaultIndexWriter(definition, definitionBuilder,
directoryFactory,
+ DefaultIndexWriter writer = new DefaultIndexWriter(definition,
definitionBuilder, directoryFactory,
FulltextIndexConstants.INDEX_DATA_CHILD_NAME,
LuceneIndexConstants.SUGGEST_DATA_CHILD_NAME, reindex,
writerConfig);
+
+ return wrapWithPipelinedIndexWriter(writer, definition.getIndexName());
+ }
+
+ public void close() {
+ LOG.info("Closing LuceneIndexWriterFactory");
+ if (indexWriterPool == null) {
+ LOG.info("Not using an Index writer pool");
+ } else {
+ indexWriterPool.close();
+ }
Review Comment:
I have lowered the level to DEBUG.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]