Rewrite comments on use_fsync option

Summary:
This replaces a vague warning about the mostly-obsolete ext3 filesystem with
a more detailed note about a historical bug in the still-relevant ext4.

Fixes #3410
Closes https://github.com/facebook/rocksdb/pull/3421

Differential Revision: D6834881

Pulled By: siying

fbshipit-source-id: 7771ef5c89a54c0ac17821680779c48178d0b400
main
Ben Darnell 7 years ago committed by Facebook Github Bot
parent 46acdc9883
commit 65cd6cd4b6
  1. 15
      include/rocksdb/options.h

@ -406,13 +406,14 @@ struct DBOptions {
// If non-null, then we should collect metrics about database operations // If non-null, then we should collect metrics about database operations
std::shared_ptr<Statistics> statistics = nullptr; std::shared_ptr<Statistics> statistics = nullptr;
// If true, then every store to stable storage will issue a fsync. // By default, writes to stable storage use fdatasync (on platforms
// If false, then every store to stable storage will issue a fdatasync. // where this function is available). If this option is true,
// This parameter should be set to true while storing data to // fsync is used instead.
// filesystem like ext3 that can lose files after a reboot. //
// Default: false // fsync and fdatasync are equally safe for our purposes and fdatasync is
// Note: on many platforms fdatasync is defined as fsync, so this parameter // faster, so it is rarely necessary to set this option. It is provided
// would make no difference. Refer to fdatasync definition in this code base. // as a workaround for kernel/filesystem bugs, such as one that affected
// fdatasync with ext4 in kernel versions prior to 3.7.
bool use_fsync = false; bool use_fsync = false;
// A list of paths where SST files can be put into, with its target size. // A list of paths where SST files can be put into, with its target size.

Loading…
Cancel
Save