You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2020/11/30 18:29:00 UTC

[jira] [Commented] (SOLR-15009) DirectoryFactory exists masks IOExceptions

    [ https://issues.apache.org/jira/browse/SOLR-15009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240959#comment-17240959 ] 

ASF subversion and git services commented on SOLR-15009:
--------------------------------------------------------

Commit cb5ba42bd7d9777eaf76705f17a3407fd2897b10 in lucene-solr's branch refs/heads/master from Mike Drob
[ https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=cb5ba42 ]

SOLR-15009 Propogate IOException from DF.exists


> DirectoryFactory exists masks IOExceptions
> ------------------------------------------
>
>                 Key: SOLR-15009
>                 URL: https://issues.apache.org/jira/browse/SOLR-15009
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 8.4.1
>            Reporter: Mike Drob
>            Priority: Major
>              Labels: NPE
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> This NPE was seen on a cluster running 8.4.1 - 
> {noformat}
> o.a.s.h.RequestHandlerBase java.lang.NullPointerException
> 	at org.apache.solr.core.StandardDirectoryFactory.exists(StandardDirectoryFactory.java:92)
> 	at org.apache.solr.core.SolrCore.getIndexSize(SolrCore.java:462)
> 	at org.apache.solr.core.SolrCore.lambda$initializeMetrics$8(SolrCore.java:1200)
> 	at org.apache.solr.metrics.SolrMetricManager$GaugeWrapper.getValue(SolrMetricManager.java:711)
> 	at org.apache.solr.util.stats.MetricUtils.convertGauge(MetricUtils.java:488)
> 	at org.apache.solr.util.stats.MetricUtils.convertMetric(MetricUtils.java:274)
> 	at org.apache.solr.util.stats.MetricUtils.lambda$toMaps$4(MetricUtils.java:213)
> {noformat}
> The problem comes from an IOException from list, which gets turned into a null return. In this case, we do want the IOException to bubble so that we can catch and log in getIndexSize.
> Aside from that, if all we really care about is whether there are files, then we could do a much more efficient check than requiring the whole directory to be listed. This is especially problematic when the directory is large or remote.



--
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