[ https://issues.apache.org/jira/browse/LUCENE-6829?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-6829: --------------------------------------- Attachment: LUCENE-6829.patch New patch. Tests pass, but I don't like the hacks I had to resort to, to have things carefully compute "safe" (write once) temp file names. There are bugs in those parts (I put nocommits). I think to fix this more safely we need to add a new required (abstract) method to Directory: {noformat} public abstract IndexOutput createTempOutput(String prefix, String suffix); {noformat} This way it's not the caller's (difficult) job of properly recursively carving up the namespace. Second, this is an API break for things that secretly used OfflineSorter (suggesters, Hunspell Dictionary, etc.), but I think this is good because it makes it clear to the caller that disk space is going to be used by this method and lets the call control where, vs running the risk of e.g. filling up your tmp partition. Some things still wanted access to "the default temp dir", so I moved it from OfflineSorter to IOUtils, and kept the test infra initializing that to the mock fs wrapped version. Hmm I think maybe it's just Hunspell, maybe I can remove that from IOUtils and just put it (privately) in Hunspell. I think ideally nothing in Lucene should be secretly using /tmp anymore. I also think somehow we should extend the "retry the file delete" that IW/IFD provides "down" to things like OfflineSorter so that virus checkers won't cause exceptions (this was Rob's idea!) but I think we should postpone until later, so I just sidestep the issue by having tests disable the virus checker. This change is already big enough. > OfflineSorter should use Directory API > -------------------------------------- > > Key: LUCENE-6829 > URL: https://issues.apache.org/jira/browse/LUCENE-6829 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Michael McCandless > Assignee: Michael McCandless > Fix For: Trunk, 5.4 > > Attachments: LUCENE-6829.patch, LUCENE-6829.patch > > > I think this is a blocker for LUCENE-6825, because the block KD-tree makes > heavy use of OfflineSorter and we don't want to fill up tmp space ... > This should be a straightforward cutover, but there are some challenges, e.g. > the test was failing because virus checker blocked deleting of files. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org