1. 24 8月, 2018 1 次提交
  2. 17 8月, 2018 2 次提交
  3. 15 8月, 2018 3 次提交
  4. 14 8月, 2018 2 次提交
    • Z
      RocksDB Trace Analyzer (#4091) · 999d955e
      Zhichao Cao 提交于
      Summary:
      A framework of trace analyzing for RocksDB
      
      After collecting the trace by using the tool of [PR #3837](https://github.com/facebook/rocksdb/pull/3837). User can use the Trace Analyzer to interpret, analyze, and characterize the collected workload.
      **Input:**
      1. trace file
      2. Whole keys space file
      
      **Statistics:**
      1. Access count of each operation (Get, Put, Delete, SingleDelete, DeleteRange, Merge) in each column family.
      2. Key hotness (access count) of each one
      3. Key space separation based on given prefix
      4. Key size distribution
      5. Value size distribution if appliable
      6. Top K accessed keys
      7. QPS statistics including the average QPS and peak QPS
      8. Top K accessed prefix
      9. The query correlation analyzing, output the number of X after Y and the corresponding average time
          intervals
      
      **Output:**
      1. key access heat map (either in the accessed key space or whole key space)
      2. trace sequence file (interpret the raw trace file to line base text file for future use)
      3. Time serial (The key space ID and its access time)
      4. Key access count distritbution
      5. Key size distribution
      6. Value size distribution (in each intervals)
      7. whole key space separation by the prefix
      8. Accessed key space separation by the prefix
      9. QPS of each operation and each column family
      10. Top K QPS and their accessed prefix range
      
      **Test:**
      1. Added the unit test of analyzing Get, Put, Delete, SingleDelete, DeleteRange, Merge
      2. Generated the trace and analyze the trace
      
      **Implemented but not tested (due to the limitation of trace_replay):**
      1. Analyzing Iterator, supporting Seek() and SeekForPrev() analyzing
      2. Analyzing the number of Key found by Get
      
      **Future Work:**
      1.  Support execution time analyzing of each requests
      2.  Support cache hit situation and block read situation of Get
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4091
      
      Differential Revision: D9256157
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: f0ceacb7eedbc43a3eee6e85b76087d7832a8fe6
      999d955e
    • Y
      Remove an assersion about file size (#4268) · 1b1d2643
      Yanqin Jin 提交于
      Summary:
      Due to 4ea56b1b, we should also remove the
      assersion in stress test. This removal can be temporary, and we can add it back
      once we figure out the reason for the 0-byte SSTs.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4268
      
      Differential Revision: D9297186
      
      Pulled By: riversand963
      
      fbshipit-source-id: cebba9a68f42e815f8cf24471176d2cfdf962f63
      1b1d2643
  5. 10 8月, 2018 4 次提交
    • Y
      Fix a TSAN failure (#4250) · b271f956
      Yanqin Jin 提交于
      Summary:
      TSAN fails due to comparison between signed int and unsigned long. Fix it by
      static_casting.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4250
      
      Differential Revision: D9256535
      
      Pulled By: riversand963
      
      fbshipit-source-id: c6bad23ff70c6d0ec58e2e85c401ce0ad45de609
      b271f956
    • D
      Implement Env::NumFileLinks (#4221) · ab22cf34
      Dmitri Smirnov 提交于
      Summary:
      Although delete scheduler implementation allows for the interface not to be supported, the delete_scheduler_test does not allow for that.
      Address compiler warnings
      Make sst_dump_test use test directory structure as the current execution directory may not be writiable.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4221
      
      Differential Revision: D9210152
      
      Pulled By: siying
      
      fbshipit-source-id: 381a74511e969ecb8089d5c4b4df87dc30c8df63
      ab22cf34
    • Y
      Add SST ingestion to ldb (#4205) · de7f423a
      Yanqin Jin 提交于
      Summary:
      We add two subcommands `write_extern_sst` and `ingest_extern_sst` to ldb. This PR avoids changing existing code because we hope to cherry-pick to earlier releases to support compatibility check for external SST file ingestion.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4205
      
      Differential Revision: D9112711
      
      Pulled By: riversand963
      
      fbshipit-source-id: 7cae88380d4de86da8440230e87eca66755648e4
      de7f423a
    • A
      Fix db_bench default compression level (#4248) · 7a9a1642
      Andrew Kryczka 提交于
      Summary:
      db_bench's previous default compression level (-1) was not the default compression level in all libraries. In particular, in ZSTD negative values are valid compression levels, while ZSTD's default compression level is three.
      
      This PR changes db_bench's default to be RocksDB's library-independent default compression level (see #3895). I also changed a couple other flags to get their default values from an options object directly rather than hardcoding.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4248
      
      Differential Revision: D9235140
      
      Pulled By: ajkr
      
      fbshipit-source-id: be4e0722d59fa1968832183db36d1d20fcf11e5b
      7a9a1642
  6. 07 8月, 2018 1 次提交
  7. 04 8月, 2018 1 次提交
  8. 03 8月, 2018 1 次提交
  9. 02 8月, 2018 1 次提交
  10. 01 8月, 2018 1 次提交
    • S
      Trace and Replay for RocksDB (#3837) · 12b6cdee
      Sagar Vemuri 提交于
      Summary:
      A framework for tracing and replaying RocksDB operations.
      
      A binary trace file is created by capturing the DB operations, and it can be replayed back at the same rate using db_bench.
      
      - Column-families are supported
      - Multi-threaded tracing is supported.
      - TraceReader and TraceWriter are exposed to the user, so that tracing to various destinations can be enabled (say, to other messaging/logging services). By default, a FileTraceReader and FileTraceWriter are implemented to capture to a file and replay from it.
      - This is not yet ideal to be enabled in production due to large performance overhead, but it can be safely tried out in a shadow setup, say, for analyzing RocksDB operations.
      
      Currently supported DB operations:
      - Writes:
      -- Put
      -- Merge
      -- Delete
      -- SingleDelete
      -- DeleteRange
      -- Write
      - Reads:
      -- Get (point lookups)
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/3837
      
      Differential Revision: D7974837
      
      Pulled By: sagar0
      
      fbshipit-source-id: 8ec65aaf336504bc1f6ed0feae67f6ed5ef97a72
      12b6cdee
  11. 31 7月, 2018 1 次提交
    • Y
      Generalize parameters generation. (#4046) · 8abafb1f
      Yanqin Jin 提交于
      Summary:
      Making generation of column families and keys virtual function so that
      subclasses of StressTest can override them to provide custom parameter
      generation for more flexibility. This will be useful for future tests.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4046
      
      Differential Revision: D9073382
      
      Pulled By: riversand963
      
      fbshipit-source-id: 2754f0fdfa5c24d95c1f92d4944bc479552fb665
      8abafb1f
  12. 28 7月, 2018 2 次提交
    • Y
      Remove random writes from SST file ingestion (#4172) · 54de5684
      Yanqin Jin 提交于
      Summary:
      RocksDB used to store global_seqno in external SST files written by
      SstFileWriter. During file ingestion, RocksDB uses `pwrite` to update the
      `global_seqno`. Since random write is not supported in some non-POSIX compliant
      file systems, external SST file ingestion is not supported on these file
      systems. To address this limitation, we no longer update `global_seqno` during
      file ingestion. Later RocksDB uses the MANIFEST and other information in table
      properties to deduce global seqno for externally-ingested SST files.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4172
      
      Differential Revision: D8961465
      
      Pulled By: riversand963
      
      fbshipit-source-id: 4382ec85270a96be5bc0cf33758ca2b167b05071
      54de5684
    • D
      Protect external file when ingesting (#4099) · f5e46354
      DorianZheng 提交于
      Summary:
      If crash happen after a hard link established, Recover function may reuse the file number that has already assigned to the internal file, and this will overwrite the external file. To protect the external file, we have to make sure the file number will never being reused.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4099
      
      Differential Revision: D9034092
      
      Pulled By: riversand963
      
      fbshipit-source-id: 3f1a737440b86aa2ef01673e5013aacbb7c33e28
      f5e46354
  13. 27 7月, 2018 1 次提交
  14. 24 7月, 2018 1 次提交
  15. 21 7月, 2018 2 次提交
  16. 19 7月, 2018 1 次提交
  17. 14 7月, 2018 2 次提交
  18. 13 7月, 2018 3 次提交
  19. 07 7月, 2018 1 次提交
    • M
      WriteUnPrepared: Add support for recovering WriteUnprepared transactions (#4078) · b9846370
      Manuel Ung 提交于
      Summary:
      This adds support for recovering WriteUnprepared transactions through the following changes:
      - The information in `RecoveredTransaction` is extended so that it can reference multiple batches.
      - `MarkBeginPrepare` is extended with a bool indicating whether it is an unprepared begin, and this is passed down to `InsertRecoveredTransaction` to indicate whether the current transaction is prepared or not.
      - `WriteUnpreparedTxnDB::Initialize` is overridden so that it will rollback unprepared transactions from the recovered transactions. This can be done without updating the prepare heap/commit map, because this is before the DB has finished initializing, and after writing the rollback batch, those data structures should not contain information about the rolled back transaction anyway.
      
      Commit/Rollback of live transactions is still unimplemented and will come later.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4078
      
      Differential Revision: D8703382
      
      Pulled By: lth
      
      fbshipit-source-id: 7e0aada6c23bd39299f1f20d6c060492e0e6b60a
      b9846370
  20. 28 6月, 2018 1 次提交
  21. 27 6月, 2018 1 次提交
  22. 24 6月, 2018 1 次提交
  23. 23 6月, 2018 2 次提交
    • M
      Pin top-level index on partitioned index/filter blocks (#4037) · 80ade9ad
      Maysam Yabandeh 提交于
      Summary:
      Top-level index in partitioned index/filter blocks are small and could be pinned in memory. So far we use that by cache_index_and_filter_blocks to false. This however make it difficult to keep account of the total memory usage. This patch introduces pin_top_level_index_and_filter which in combination with cache_index_and_filter_blocks=true keeps the top-level index in cache and yet pinned them to avoid cache misses and also cache lookup overhead.
      Closes https://github.com/facebook/rocksdb/pull/4037
      
      Differential Revision: D8596218
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: 3a5f7f9ca6b4b525b03ff6bd82354881ae974ad2
      80ade9ad
    • Y
      Fix dangling checkpoint pointer in db_stress (#4042) · c726f7fd
      Yi Wu 提交于
      Summary:
      Fix db_stress failed to delete checkpoint pointer. It's caught by asan_crash test.
      Closes https://github.com/facebook/rocksdb/pull/4042
      
      Differential Revision: D8592604
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 7b2d67d5e3dfb05f71c33fcf320482303e97d3ef
      c726f7fd
  24. 22 6月, 2018 2 次提交
    • A
      Cleanup staging directory at start of checkpoint (#4035) · 0a5b16c7
      Andrew Kryczka 提交于
      Summary:
      - Attempt to clean the checkpoint staging directory before starting a checkpoint. It was already cleaned up at the end of checkpoint. But it wasn't cleaned up in the edge case where the process crashed while staging checkpoint files.
      - Attempt to clean the checkpoint directory before calling `Checkpoint::Create` in `db_stress`. This handles the case where checkpoint directory was created by a previous `db_stress` run but the process crashed before cleaning it up.
      - Use `DestroyDB` for cleaning checkpoint directory since a checkpoint is a DB.
      Closes https://github.com/facebook/rocksdb/pull/4035
      
      Reviewed By: yiwu-arbug
      
      Differential Revision: D8580223
      
      Pulled By: ajkr
      
      fbshipit-source-id: 28c667400e249fad0fdedc664b349031b7b61599
      0a5b16c7
    • Y
      Fix a warning (treated as error) caused by type mismatch. · 39749596
      Yanqin Jin 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/4032
      
      Differential Revision: D8573061
      
      Pulled By: riversand963
      
      fbshipit-source-id: 112324dcb35956d6b3ec891073f4f21493933c8b
      39749596
  25. 21 6月, 2018 2 次提交
    • Y
      Add file name info to SequentialFileReader. (#4026) · 524c6e6b
      Yanqin Jin 提交于
      Summary:
      We potentially need this information for tracing, profiling and diagnosis.
      Closes https://github.com/facebook/rocksdb/pull/4026
      
      Differential Revision: D8555214
      
      Pulled By: riversand963
      
      fbshipit-source-id: 4263e06c00b6d5410b46aa46eb4e358ff2161dd2
      524c6e6b
    • A
      Support file ingestion in stress test (#4018) · 14cee194
      Andrew Kryczka 提交于
      Summary:
      Once per `ingest_external_file_one_in` operations, uses SstFileWriter to create a file containing `ingest_external_file_width` consecutive keys. The file is named containing the thread ID to avoid clashes. The file is then added to the DB using `IngestExternalFile`.
      
      We can't enable it by default in crash test because `nooverwritepercent` and `test_batches_snapshot` both must be zero for the DB's whole lifetime. Perhaps we should setup a separate test with that config as range deletion also requires it.
      Closes https://github.com/facebook/rocksdb/pull/4018
      
      Differential Revision: D8507698
      
      Pulled By: ajkr
      
      fbshipit-source-id: 1437ea26fd989349a9ce8b94117241c65e40f10f
      14cee194