1. 29 7月, 2014 3 次提交
    • S
      Add DB::GetIntProperty() to return integer properties to be returned as integers · f04356e6
      sdong 提交于
      Summary: We have quite some properties that are integers and we are adding more. Add a function to directly return them as an integer, instead of a string
      
      Test Plan: Add several unit test checks
      
      Reviewers: yhchiang, igor, dhruba, haobo, ljin
      
      Reviewed By: ljin
      
      Subscribers: yoshinorim, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20637
      f04356e6
    • S
      Add DB property estimated number of keys · f6784766
      sdong 提交于
      Summary: Add a DB property of estimated number of live keys, by adding number of entries of all mem tables and all files, subtracted by all deletions in all files.
      
      Test Plan: Add the case in unit tests
      
      Reviewers: hobbymanyp, ljin
      
      Reviewed By: ljin
      
      Subscribers: MarkCallaghan, yoshinorim, leveldb, igor, dhruba
      
      Differential Revision: https://reviews.facebook.net/D20631
      f6784766
    • L
      make statistics forward-able · 40fa8a4c
      Lei Jin 提交于
      Summary:
      Make StatisticsImpl being able to forward stats to provided statistics
      implementation. The main purpose is to allow us to collect internal
      stats in the future even when user supplies custom statistics
      implementation. It avoids intrumenting 2 sets of stats collection code.
      One immediate use case is tuning advisor, which needs to collect some
      internal stats, users may not be interested.
      
      Test Plan:
      ran db_bench and see stats show up at the end of run
      Will run make all check since some tests rely on statistics
      
      Reviewers: yhchiang, sdong, igor
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20145
      40fa8a4c
  2. 23 7月, 2014 1 次提交
    • I
      Move include/utilities/*.h to include/rocksdb/utilities/*.h · 0ff183a0
      Igor Canadi 提交于
      Summary:
      All public headers need to be under `include/rocksdb` directory. Otherwise, clients include our header files like this:
      
          #include <rocksdb/db.h>
          #include <utilities/backupable_db.h> // still our public header!
      
      Also, internally, we include:
      
          #include "utilities/backupable/backupable_db.h" // internal header
          #include "utilities/backupable_db.h" // public header
      
      which is confusing.
      
      This way, when we install rocksdb as a system library, we can just copy `include/rocksdb` directory to system's header files. We can't really copy `utilities` directory to system's header files.
      
      Test Plan: compiles
      
      Reviewers: dhruba, ljin, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D20409
      0ff183a0
  3. 19 7月, 2014 1 次提交
  4. 18 7月, 2014 1 次提交
  5. 16 7月, 2014 1 次提交
  6. 11 7月, 2014 2 次提交
  7. 09 7月, 2014 1 次提交
    • L
      integrate rate limiter into rocksdb · 534357ca
      Lei Jin 提交于
      Summary:
      Add option and plugin rate limiter for PosixWritableFile. The rate
      limiter only applies to flush and compaction. WAL and MANIFEST are
      excluded from this enforcement.
      
      Test Plan: db_test
      
      Reviewers: igor, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19425
      534357ca
  8. 04 7月, 2014 1 次提交
  9. 02 7月, 2014 1 次提交
    • S
      HashLinkList memtable switches a bucket to a skip list to reduce performance outliers · 9c332aa1
      sdong 提交于
      Summary:
      In this patch, we enhance HashLinkList memtable to reduce performance outliers when a bucket contains too many entries. We switch to skip list for this case to enable binary search.
      
      Add threshold_use_skiplist parameter to determine when a bucket needs to switch to skip list.
      
      The new data structure is documented in comments in the codes.
      
      Test Plan:
      make all check
      set threshold_use_skiplist in several tests
      
      Reviewers: yhchiang, haobo, ljin
      
      Reviewed By: yhchiang, ljin
      
      Subscribers: nkg-, xjin, dhruba, yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D19299
      9c332aa1
  10. 24 6月, 2014 2 次提交
  11. 20 6月, 2014 1 次提交
    • I
      Remove seek compaction · d4a84233
      Igor Canadi 提交于
      Summary:
      As discussed in our internal group, we don't get much use of seek compaction at the moment, while it's making code more complicated and slower in some cases.
      
      This diff removes seek compaction and (hopefully) all code that was introduced to support seek compaction.
      
      There is one test case that relied on didIO information. I'll try to find another way to implement it.
      
      Test Plan: make check
      
      Reviewers: sdong, haobo, yhchiang, ljin, dhruba
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19161
      d4a84233
  12. 18 6月, 2014 2 次提交
  13. 22 5月, 2014 2 次提交
    • I
      Update HISTORY.md · 1fd4654d
      Igor Canadi 提交于
      1fd4654d
    • I
      FIFO compaction style · 6de6a066
      Igor Canadi 提交于
      Summary:
      Introducing new compaction style -- FIFO.
      
      FIFO compaction style has write amplification of 1 (+1 for WAL) and it deletes the oldest files when the total DB size exceeds pre-configured values.
      
      FIFO compaction style is suited for storing high-frequency event logs.
      
      Test Plan: Added a unit test
      
      Reviewers: dhruba, haobo, sdong
      
      Reviewed By: dhruba
      
      Subscribers: alberts, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18765
      6de6a066
  14. 16 5月, 2014 1 次提交
  15. 14 5月, 2014 1 次提交
    • I
      TablePropertiesCollectorFactory · 26f5dd9a
      Igor Canadi 提交于
      Summary:
      This diff addresses task #4296714 and rethinks how users provide us with TablePropertiesCollectors as part of Options.
      
      Here's description of task #4296714:
             I'm debugging #4295529 and noticed that our count of user properties kDeletedKeys is wrong. We're sharing one single InternalKeyPropertiesCollector with all Table Builders. In LOG Files, we're outputting number of kDeletedKeys as connected with a single table, while it's actually the total count of deleted keys since creation of the DB.
      
             For example, this table has 3155 entries and 1391828 deleted keys.
      
      The problem with current approach that we call methods on a single TablePropertiesCollector for all the tables we create. Even worse, we could do it from multiple threads at the same time and TablePropertiesCollector has no way of knowing which table we're calling it for.
      
      Good part: Looks like nobody inside Facebook is using Options::table_properties_collectors. This means we should be able to painfully change the API.
      
      In this change, I introduce TablePropertiesCollectorFactory. For every table we create, we call `CreateTablePropertiesCollector`, which creates a TablePropertiesCollector for a single table. We then use it sequentially from a single thread, which means it doesn't have to be thread-safe.
      
      Test Plan:
      Added a test in table_properties_collector_test that fails on master (build two tables, assert that kDeletedKeys count is correct for the second one).
      Also, all other tests
      
      Reviewers: sdong, dhruba, haobo, kailiu
      
      Reviewed By: kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D18579
      26f5dd9a
  16. 06 5月, 2014 2 次提交
  17. 02 5月, 2014 1 次提交
  18. 26 4月, 2014 1 次提交
  19. 19 4月, 2014 1 次提交
    • J
      Added period · a7450895
      James Pearce 提交于
      This is a PR to test some tooling; please do not merge without talking to @jamesgpearce :)
      a7450895
  20. 11 4月, 2014 1 次提交
  21. 05 4月, 2014 1 次提交
    • S
      Update HISTORY.md · f01a04ea
      sdong 提交于
      Summary: Update HISTORY.md to make existing items to 2.8 release and add something I think is missing.
      
      Test Plan: N/A
      
      Reviewers: haobo, igor, ljin, dhruba, yhchiang, xjin
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D17517
      f01a04ea
  22. 03 4月, 2014 1 次提交
  23. 01 4月, 2014 1 次提交
  24. 29 3月, 2014 1 次提交
  25. 26 3月, 2014 1 次提交
  26. 25 3月, 2014 1 次提交
    • D
      [rocksdb] new CompactionFilterV2 API · b47812fb
      Danny Guo 提交于
      Summary:
      This diff adds a new CompactionFilterV2 API that roll up the
      decisions of kv pairs during compactions. These kv pairs must share the
      same key prefix. They are buffered inside the db.
      
          typedef std::vector<Slice> SliceVector;
          virtual std::vector<bool> Filter(int level,
                                       const SliceVector& keys,
                                       const SliceVector& existing_values,
                                       std::vector<std::string>* new_values,
                                       std::vector<bool>* values_changed
                                       ) const = 0;
      
      Application can override the Filter() function to operate
      on the buffered kv pairs. More details in the inline documentation.
      
      Test Plan:
      make check. Added unit tests to make sure Keep, Delete,
      Change all works.
      
      Reviewers: haobo
      
      CCs: leveldb
      
      Differential Revision: https://reviews.facebook.net/D15087
      b47812fb
  27. 21 3月, 2014 2 次提交
  28. 19 3月, 2014 1 次提交
  29. 13 3月, 2014 1 次提交
    • I
      [CF] Code cleanup part 1 · fb2346fc
      Igor Canadi 提交于
      Summary:
      I'm cleaning up some code preparing for the big diff review tomorrow. This is the first part of the cleanup.
      
      Changes are mostly cosmetic. The goal is to decrease amount of code difference between columnfamilies and master branch.
      
      This diff also fixes race condition when dropping column family.
      
      Test Plan: Ran db_stress with variety of parameters
      
      Reviewers: dhruba, haobo
      
      Differential Revision: https://reviews.facebook.net/D16833
      fb2346fc
  30. 12 3月, 2014 1 次提交
  31. 11 3月, 2014 2 次提交
    • L
      Consolidate SliceTransform object ownership · 8d007b4a
      Lei Jin 提交于
      Summary:
      (1) Fix SanitizeOptions() to also check HashLinkList. The current
      dynamic case just happens to work because the 2 classes have the same
      layout.
      (2) Do not delete SliceTransform object in HashSkipListFactory and
      HashLinkListFactory destructor. Reason: SanitizeOptions() enforces
      prefix_extractor and SliceTransform to be the same object when
      Hash**Factory is used. This makes the behavior strange: when
      Hash**Factory is used, prefix_extractor will be released by RocksDB. If
      other memtable factory is used, prefix_extractor should be released by
      user.
      
      Test Plan: db_bench && make asan_check
      
      Reviewers: haobo, igor, sdong
      
      Reviewed By: igor
      
      CC: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D16587
      8d007b4a
    • I
      Add option verify_checksums_in_compaction · 04d2c26e
      Igor Canadi 提交于
      Summary:
      If verify_checksums_in_compaction is true, compaction will verify checksums. This is default.
      If it's false, compaction doesn't verify checksums. This is useful for in-memory workloads.
      
      Test Plan: corruption_test
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D16695
      04d2c26e