You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Nikolay Martynov (JIRA)" <ji...@apache.org> on 2017/11/09 03:20:01 UTC

[jira] [Created] (SOLR-11626) Filesystems do not guarantee order of directories updates

Nikolay Martynov created SOLR-11626:
---------------------------------------

             Summary: Filesystems do not guarantee order of directories updates
                 Key: SOLR-11626
                 URL: https://issues.apache.org/jira/browse/SOLR-11626
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
            Reporter: Nikolay Martynov


Currently when index is written to disk the following sequence of events is taking place:
* write segment file
* sync segment file
* write segment file
* sync segment file
...
* write list of segments
* sync list of segments
* rename list of segments
* sync index directory

This sequence leads to potential window of opportunity for system to crash after 'rename list of segments' but before 'sync index directory' and depending on exact filesystem implementation this may potentially lead to 'list of segments' being visible in directory while some of the segments are not.

Solution to this is to sync index directory after all segments have been written. [This commit|https://github.com/mar-kolya/lucene-solr/commit/58e05dd1f633ab9b02d9e6374c7fab59689ae71c] shows idea implemented. I'm fairly certain that I didn't find all the places this may be potentially happening.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org