magibney commented on PR #2336: URL: https://github.com/apache/solr/pull/2336#issuecomment-1985671846
Looked into this a little bit more, and I suspect the close errors are a symptom of some faulty logic in reordering removals. There's an attempt in `CachingDirectoryFactory.closeCacheValue(CacheValue)` to defer deletion of parent paths by [associating them with subpaths that are also tracked](https://github.com/apache/solr/blob/cebc10d060ff5fa7b9a52660a02a27c2ed6af1f0/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java#L255-L269). There are really two problems: one problem occurs when there are _two_ subpaths that match a given parent -- the parent is arbitrarily added to one or the other child, and thus the parent can be deleted before its subpath (defeating the reordering logic). The other problem (the one expect we're actually hitting most of the time) is that for removals that are deferred until core close, there is no removal reordering [upon iteration of CachingDirectoryFactory.removeEntries](https://github.com/apache/solr/blob/cebc10d060ff5fa7b9a52660a02a27c2ed6af1f0/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java#L213-L220) -- this is in arbitrary `HashMap` iteration order, so parent dirs will often be removed before child dirs. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org