Can anyone verify that the jira has been created sensible?
Thanks in advance.
https://issues.apache.org/jira/browse/SOLR-4066
Best regards Trym
Den 10-11-2012 00:54, Mark Miller skrev:
Please file a JIRA issue for this change.
- Mark
On Nov 9, 2012, at 8:41 AM, Trym R. Møller <t...@sigmat.dk> wrote:
Hi
The constructor of SolrZKClient has changed, I expect to ensure clean up of
resources. The strategy is as follows:
connManager = new ConnectionManager(...)
try {
...
} catch (Throwable e) {
connManager.close();
throw new RuntimeException();
}
try {
connManager.waitForConnected(clientConnectTimeout);
} catch (Throwable e) {
connManager.close();
throw new RuntimeException();
}
This results in a different exception (RuntimeException) returned from the
constructor as earlier (nice exceptions as UnknownHostException,
TimeoutException).
Can this be changed so we keep the old nice exceptions e.g. as follows
(requiring the constructor to declare these) or at least include them as cause
in the RuntimeException?
boolean closeBecauseOfException = true;
try {
...
connManager.waitForConnected(clientConnectTimeout);
closeBecauseOfException = false
} finally {
if (closeBecauseOfException) {
connManager.close();
}
}
Any comments appreciated.
Best regards Trym
http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_4_0/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java