1. 11 11月, 2015 1 次提交
    • Y
      Enable RocksDB to persist Options file. · e114f0ab
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch allows rocksdb to persist options into a file on
      DB::Open, SetOptions, and Create / Drop ColumnFamily.
      Options files are created under the same directory as the rocksdb
      instance.
      
      In addition, this patch also adds a fail_if_missing_options_file in DBOptions
      that makes any function call return non-ok status when it is not able to
      persist options properly.
      
        // If true, then DB::Open / CreateColumnFamily / DropColumnFamily
        // / SetOptions will fail if options file is not detected or properly
        // persisted.
        //
        // DEFAULT: false
        bool fail_if_missing_options_file;
      
      Options file names are formatted as OPTIONS-<number>, and RocksDB
      will always keep the latest two options files.
      
      Test Plan:
      Add options_file_test.
      
      options_test
      column_family_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D48285
      e114f0ab
  2. 31 10月, 2015 1 次提交
  3. 30 10月, 2015 2 次提交
  4. 29 10月, 2015 1 次提交
  5. 28 10月, 2015 1 次提交
    • D
      Implement smart buffer management. · 6fbc4f9f
      Dmitri Smirnov 提交于
        introduce a new DBOption random_access_max_buffer_size to limit
        the size of the random access buffer used for unbuffered access.
        Implement read ahead buffering when enabled.
        To that effect propagate compaction_readahead_size and the new option
        to the env options to make it available for the implementation.
        Add Hint() override so SetupForCompaction() call would call Hint()
        readahead can now be setup from both Hint() and EnableReadAhead()
        Add new option random_access_max_buffer_size support
        db_bench, options_helper to make it string parsable
        and the unit test.
      6fbc4f9f
  6. 19 10月, 2015 1 次提交
  7. 12 10月, 2015 1 次提交
    • Y
      [RocksDB Options File] Add TableOptions section and support BlockBasedTable · 0bb8ea56
      Yueh-Hsuan Chiang 提交于
      Summary:
      Introduce TableOptions section and support BlockBasedTable in RocksDB
      options file.  A TableOptions section has the following format:
      
        [TableOptions/<FactoryClassName> "<ColumnFamily Name>"]
      
      which includes information about its TableFactory class and belonging
      column family.  Below is an example TableOptions section of a
      BlockBasedTableOptions that belongs to the default column family:
      
        [TableOptions/BlockBasedTable "default"]
          format_version=0
          whole_key_filtering=true
          block_size_deviation=10
          block_size=4096
          block_restart_interval=16
          filter_policy=nullptr
          no_block_cache=false
          checksum=kCRC32c
          cache_index_and_filter_blocks=false
          index_type=kBinarySearch
          hash_index_allow_collision=true
          flush_block_policy_factory=FlushBlockBySizePolicyFactory
      
      Currently, Cache-type options (i.e., block_cache and block_cache_compressed)
      are not supported.
      
      Test Plan: options_test
      
      Reviewers: igor, anthony, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48435
      0bb8ea56
  8. 08 10月, 2015 1 次提交
  9. 03 10月, 2015 1 次提交
    • Y
      [RocksDB Options] Support more options in RocksDBOptionParser for sanity check. · 5c7bf56d
      Yueh-Hsuan Chiang 提交于
      Summary:
      RocksDBOptionsParser now supports CompressionType and the following
      pointer-typed options in RocksDBOptionParser
      for sanity check:
        prefix_extractor
        table_factory
        comparator
        compaction_filter
        compaction_filter_factory
        merge_operator
        memtable_factory
      
      In the RocksDB Options file, only high level information about pointer-typed
      options are serialized, and those information is only used for verification
      / sanity check purpose.
      
      Test Plan: added more tests in options_test
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47925
      5c7bf56d
  10. 30 9月, 2015 2 次提交
    • Y
      Better handling of deprecated options in RocksDBOptionsParser · 1e73b11a
      Yueh-Hsuan Chiang 提交于
      Summary:
      Previously, we treat deprecated options as normal options in
      RocksDBOptionsParser.  However, these deprecated options should
      not be verified and serialized.
      
      Test Plan: options_test
      
      Reviewers: igor, sdong, IslamAbdelRahman, anthony
      
      Reviewed By: anthony
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47775
      1e73b11a
    • Y
      RocksDB Options file format and its serialization / deserialization. · 74b100ac
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch defines the format of RocksDB options file, which
      follows the INI file format, and implements functions for its
      serialization and deserialization.  An example RocksDB options
      file can be found in examples/rocksdb_option_file_example.ini.
      
      A typical RocksDB options file has three sections, which are
      Version, DBOptions, and more than one CFOptions.  The RocksDB
      options file in general follows the basic INI file format
      with the following extensions / modifications:
       * Escaped characters
         We escaped the following characters:
          - \n -- line feed - new line
          - \r -- carriage return
          - \\ -- backslash \
          - \: -- colon symbol :
          - \# -- hash tag #
       * Comments
         We support # style comments.  Comments can appear at the ending
         part of a line.
       * Statements
         A statement is of the form option_name = value.
         Each statement contains a '=', where extra white-spaces
         are supported. However, we don't support multi-lined statement.
         Furthermore, each line can only contain at most one statement.
       * Section
         Sections are of the form [SecitonTitle "SectionArgument"],
         where section argument is optional.
       * List
         We use colon-separated string to represent a list.
         For instance, n1:n2:n3:n4 is a list containing four values.
      
      Below is an example of a RocksDB options file:
      
      [Version]
        rocksdb_version=4.0.0
        options_file_version=1.0
      [DBOptions]
        max_open_files=12345
        max_background_flushes=301
      [CFOptions "default"]
      [CFOptions "the second column family"]
      [CFOptions "the third column family"]
      
      Test Plan: Added many tests in options_test.cc
      
      Reviewers: igor, IslamAbdelRahman, sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: maykov, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D46059
      74b100ac
  11. 15 9月, 2015 1 次提交
  12. 27 8月, 2015 2 次提交
    • Y
      ColumnFamilyOptions serialization / deserialization. · 1fb2abae
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch adds GetStringFromColumnFamilyOptions(), the inverse function
      of the existing GetColumnFamilyOptionsFromString(), and improves
      the implementation of GetColumnFamilyOptionsFromString().
      
      Test Plan: Add a test in options_test.cc
      
      Reviewers: igor, sdong, anthony, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: noetzli, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D45009
      1fb2abae
    • I
      ReadaheadRandomAccessFile -- userspace readahead · 5f4166c9
      Igor Canadi 提交于
      Summary:
      ReadaheadRandomAccessFile acts as a transparent layer on top of RandomAccessFile. When a Read() request is issued, it issues a much bigger request to the OS and caches the result. When a new request comes in and we already have the data cached, it doesn't have to issue any requests to the OS.
      
      We add ReadaheadRandomAccessFile layer only when file is read during compactions.
      
      D45105 was incorrectly closed by Phabricator because I committed it to a separate branch (not master), so I'm resubmitting the diff.
      
      Test Plan: make check
      
      Reviewers: MarkCallaghan, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D45123
      5f4166c9
  13. 22 8月, 2015 1 次提交
    • A
      Changed 'num_subcompactions' to the more accurate 'max_subcompactions' · b6def58f
      Ari Ekmekji 提交于
      Summary:
      Up until this point we had DbOptions.num_subcompactions, but
      it is semantically more correct to call this max_subcompactions since
      we will schedule *up to* DbOptions.max_subcompactions smaller compactions
      at a time during a compaction job.
      
      I also added a --subcompactions option to db_bench
      
      Test Plan: make all   make check
      
      Reviewers: sdong, igor, anthony, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D45069
      b6def58f
  14. 21 8月, 2015 1 次提交
    • S
      Add options.new_table_reader_for_compaction_inputs · 9130873a
      sdong 提交于
      Summary: Currently compaction inputs share the same file descriptor and table reader as other foreground threads. It makes fadvise works less predictable. Add options.new_table_reader_for_compaction_inputs to enforce to create a new file descriptor and new table reader for it.
      
      Test Plan: Add the option.
      
      Reviewers: rven, anthony, kradhakrishnan, IslamAbdelRahman, igor, yhchiang
      
      Reviewed By: igor
      
      Subscribers: igor, MarkCallaghan, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D43311
      9130873a
  15. 19 8月, 2015 1 次提交
    • Y
      DBOptions serialization and deserialization · 9ec95715
      Yueh-Hsuan Chiang 提交于
      Summary:
      This patch implements DBOptions deserialization and improve
      the current implementation of DBOptions serialization by
      using a static structure that stores the offset of each
      DBOptions member variables to perform serialization and
      deserialization instead of using tons of if-then-branch
      to determine the mapping between string and variables.
      
      Test Plan: Added test in options_test.cc
      
      Reviewers: igor, anthony, sdong, IslamAbdelRahman
      
      Reviewed By: sdong
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D44097
      9ec95715
  16. 19 11月, 2014 1 次提交
  17. 05 11月, 2014 1 次提交
  18. 18 9月, 2014 1 次提交