@Override
    public void run() {
      try {
        write();
      } catch (Exception e) {
        logger.error("Index : {} error while persisting the index to disk", dataDir, e);
      }
    }
Writes all the individual index segments to disk. It flushes the log before starting the
index flush. The penultimate index segment is flushed if it is not already flushed and mapped.
The last index segment is flushed whenever write is invoked.
@throws StoreException
ambry-store/src/main/java/com/github/ambry/store/PersistentIndex.java