Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
New
Description
When using NRTCachingDirectory, if the new created segment is in compound format, in the method of createOutput(String name,IOContext context), the real context is not used and uses IOContext.DEFAULT instead. So the estimatedMergeBytes or estimatedSegmentSize will always be smaller than maxMergeSizeBytes,maxCachedBytes, resulting in new created compound segment is always in cache(RAMDirectory). And these new large segments created by merging will be referenced by ReaderPool in the IndexWriter when using NRT feature, resulting in much memory used in process and actually these referenced large segments has already been sync to disk when commit.