[
https://issues.apache.org/jira/browse/SOLR-8190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15062376#comment-15062376
]
Joel Bernstein commented on SOLR-8190:
--------------------------------------
The /stream and /sql handler should be calling open() and close() in the
majority of situations. There are also situations where the Streams themselves
may open() and close() internal streams. For example the hashJoin stream may
open a stream read it into a hashtable and then close the stream.
But if people want to work directly with the Streaming API, rather the sending
a Streaming Expression to the /stream handler, it would be nice to add some
robustness to how open and close are handled. Probably we should through
exceptions in the first three cases you mention.
> Implement Closeable on TupleStream
> ----------------------------------
>
> Key: SOLR-8190
> URL: https://issues.apache.org/jira/browse/SOLR-8190
> Project: Solr
> Issue Type: Bug
> Components: SolrJ
> Affects Versions: Trunk
> Reporter: Kevin Risden
> Assignee: Joel Bernstein
> Priority: Minor
> Attachments: SOLR-8190.patch, SOLR-8190.patch
>
>
> Implementing Closeable on TupleStream provides the ability to use
> try-with-resources
> (https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html)
> in tests and in practice. This prevents TupleStreams from being left open
> when there is an error in the tests.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]