Michael McCandless created LUCENE-6757:
------------------------------------------
Summary: Directory.openInput should not directly return IndexInput
Key: LUCENE-6757
URL: https://issues.apache.org/jira/browse/LUCENE-6757
Project: Lucene - Core
Issue Type: Improvement
Reporter: Michael McCandless
Spinoff from LUCENE-6745 suggested by [~rcmuir].
It's dangerous today that Directory.openInput returns an IndexInput which you
can then use for IO but also clone so other threads can do thread-private IO.
We could instead make this strongly typed, e.g. Directory.openInput returns a
thingy (Handle, Descriptor, something) whose sole purpose is to 1) produce
IndexInput for thread-private use, and 2) close.
In the meantime, we could add some simple asserts to MDW to detect if the
"original" IndexInput is ever use for anything but cloning, when other threads
have cloned / do clone in the future. I'll explore that first ... it's a start.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]