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

Alexey Serba commented on SOLR-8587:
------------------------------------

I recently upgraded my Solr version to 5.5 and noticed that 
{{/solr/admin/cores}} API stopped working with the following exception:

{noformat}
ERROR org.apache.solr.handler.RequestHandlerBase - 
org.apache.solr.common.SolrException: Error handling 'status' action
    at 
org.apache.solr.handler.admin.CoreAdminOperation$4.call(CoreAdminOperation.java:192)
    at 
org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:354)
    at 
org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:153)
    at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
...
Caused by: java.nio.file.NoSuchFileException: 
solr-cloud-1/collection1_shard2_replica1/data/index/segments_1
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at 
sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
    at 
sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144)
    at java.nio.file.Files.readAttributes(Files.java:1737)
    at java.nio.file.Files.size(Files.java:2332)
    at org.apache.lucene.store.FSDirectory.fileLength(FSDirectory.java:210)
    at 
org.apache.lucene.store.NRTCachingDirectory.fileLength(NRTCachingDirectory.java:127)
    at 
org.apache.solr.handler.admin.LukeRequestHandler.getIndexInfo(LukeRequestHandler.java:592)
    at 
org.apache.solr.handler.admin.CoreAdminOperation.getCoreStatus(CoreAdminOperation.java:886)
{noformat}

If I go to file system - I see there is {{segments_2}} file, then 
{{segments_3}}, but core admin still tries to check {{segments_1}} file (even 
if you try to reload {{/solr/admin/cores}})

LukeRequestHandler does
{code}
    IndexCommit indexCommit = reader.getIndexCommit();
    String segmentsFileName = indexCommit.getSegmentsFileName();
{code}
but apparently that file is gone at that point.

There's a similar report of this problem in 
[SOLR-4146|https://issues.apache.org/jira/browse/SOLR-4146?focusedCommentId=15141345&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15141345]

I'm wondering if it is possible to fix or revert 
[087ebf6|https://github.com/apache/lucene-solr/commit/087ebf6] in 5.5.1?

> Add segments file information to core admin status
> --------------------------------------------------
>
>                 Key: SOLR-8587
>                 URL: https://issues.apache.org/jira/browse/SOLR-8587
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>             Fix For: 5.5, master
>
>         Attachments: SOLR-8587.patch, SOLR-8587.patch
>
>
> Having the index's segments file name returned by CoreAdminHandler STATUS can 
> be useful. The info I'm thinking about is the segments file name and its 
> size. If you record that from time to time, in a case of crisis, when u need 
> to restore the index and may not be sure which copy you need to restore, this 
> tiny piece of info can be very useful, as the segmentsN file records the 
> commit point, and therefore what you core reported and what you see at hand 
> can help you make a safer decision.
> I also think it's useful info in general, e.g. probably even more than 
> 'version', and it doesn't add much complexity to the handler or the response.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to