You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Robert Muir (Jira)" <ji...@apache.org> on 2021/02/19 01:45:00 UTC

[jira] [Created] (LUCENE-9788) Add more checks to DirectIODirectory?

Robert Muir created LUCENE-9788:
-----------------------------------

             Summary: Add more checks to DirectIODirectory?
                 Key: LUCENE-9788
                 URL: https://issues.apache.org/jira/browse/LUCENE-9788
             Project: Lucene - Core
          Issue Type: Improvement
            Reporter: Robert Muir


Followup to LUCENE-9774 (which just added an assumption to the tests so they will pass on unsupported filesystems).

If you try to use DirectIODirectory on an unsupported FS like tmpfs (I am sure there are others), you'll get some nasty behavior: EINVAL from the kernel (translates to a FilesystemException), leftover files on the filesystem, etc. See LUCENE-9774's PR for some more explanation.

Maybe we could try to make the behavior friendlier/clearer in some way. It will behave like a bug today. 

Some options might be:
* improve the javadocs / make javadocs stand out better.
* catch the evil EINVAL from this specific place and add a suppressed "explanation" that helps (I think we've done similar stuff before with the confusing OutOfMemoryError from FileChannel.map)
* probe that the thing can work against the filesystem in DirectIODirectory code itself somehow? This seems a bit scary as it means we have to write files, try to delete the leaked files when it fails, avoid masking other actual errors, etc.
* others...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org