Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-3250

fsync the directory after new sstable or commit log segment are created

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.1.0
    • Component/s: None
    • Labels:
      None
    • Severity:
      Low

      Description

      The mannual of fsync said:

      Calling fsync() does not necessarily ensure that the entry in the directory containing the file has also reached disk. For that an explicit fsync() on a file descriptor for the directory is also needed.

      At least on ext4, syncing the directory is a must to have step, as described by [1]. Otherwise, the new sstables or commit logs could be missed after crash even if itself is synced.

      Unfortunately, JVM does not provide an approach to sync the directory...

      [1] http://www.linuxfoundation.org/news-media/blogs/browse/2009/03/don%E2%80%99t-fear-fsync

        Attachments

        1. CASSANDRA-3250.patch
          7 kB
          Pavel Yaskevich
        2. CASSANDRA-3250-v2.patch
          5 kB
          Pavel Yaskevich
        3. CASSANDRA-3250-v3.patch
          5 kB
          Pavel Yaskevich

          Issue Links

            Activity

              People

              • Assignee:
                xedin Pavel Yaskevich
                Reporter:
                hanzhu Zhu Han
                Authors:
                Pavel Yaskevich
                Reviewers:
                Jonathan Ellis
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: