File size is updated correctly according to 

> fdatasync() is similar to fsync(), but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled.  For example, changes to  st_atime  or  st_mtime  (respec‐
       tively,  time  of  last  access  and  time  of last modification; see inode(7)) do not require flushing because they are not necessary for a subsequent data read to be handled correctly.  On the other hand, a change to the file size
       (st_size, as made by say ftruncate(2)), would require a metadata flush.

And we don't care about modification times.
Should work alright.
{
        ssize_t  bytes_written;
        #if defined(__FreeBSD__)
            bytes_written = aio_return(reinterpret_cast<struct aiocb *>(event.udata));
        #else
            bytes_written = event.res;
        #endif
        return bytes_written;
    }
    String file_path;
    size_t block_size;
    size_t file_blocks_size;
    FileDescriptor file;
    size_t current_block_index = 0;
    size_t current_blocks_size = 0;
};
/** ICacheDictionaryStorage implementation that keeps column data serialized in memory index and in disk partitions.
  * Data is first written in memory buffer.
  * If memory buffer is full then buffer is flushed to disk partition.
  * If memory buffer cannot be flushed to associated disk partition, then if partition
  * can be allocated (current partition index < max_partitions_size) storage allocates new partition, if not old partitions are reused.
  * Index maps key to partition block and offset.
  */
template <DictionaryKeyType dictionary_key_type>
class SSDCacheDictionaryStorage final : public ICacheDictionaryStorage