1. 11 11月, 2020 1 次提交
  2. 04 11月, 2020 1 次提交
  3. 29 10月, 2020 1 次提交
    • R
      In ParseInternalKey(), include corrupt key info in Status (#7515) · 9a690a74
      Ramkumar Vadivelu 提交于
      Summary:
      Fixes Issue https://github.com/facebook/rocksdb/issues/7497
      
      When allow_data_in_errors db_options is set, log error key details in `ParseInternalKey()`
      
      Have fixed most of the calls. Have few TODOs still pending - because have to make more deeper changes to pass in the allow_data_in_errors flag. Will do those in a separate PR later.
      
      Tests:
      - make check
      - some of the existing tests that exercise the "internal key too small" condition are: dbformat_test, cuckoo_table_builder_test
      - some of the existing tests that exercise the corrupted key path are: corruption_test, merge_helper_test, compaction_iterator_test
      
      Example of new status returns:
      - Key too small - `Corrupted Key: Internal Key too small. Size=5`
      - Corrupt key with allow_data_in_errors option set to false: `Corrupted Key: '<redacted>' seq:3, type:3`
      - Corrupt key with allow_data_in_errors option set to true: `Corrupted Key: '61' seq:3, type:3`
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7515
      
      Reviewed By: ajkr
      
      Differential Revision: D24240264
      
      Pulled By: ramvadiv
      
      fbshipit-source-id: bc48f5d4475ac19d7713e16df37505b31aac42e7
      9a690a74
  4. 01 10月, 2020 1 次提交
  5. 30 9月, 2020 1 次提交
  6. 26 9月, 2020 1 次提交
  7. 18 8月, 2020 1 次提交
  8. 15 8月, 2020 1 次提交
    • Y
      Get() with timestamp should respect snapshot (#7227) · d758273c
      Yanqin Jin 提交于
      Summary:
      If user-defined timestamp is enabled, current implementation can expose
      newer data to queries even if an older sequence number is specified via
      read_options.snapshot. This PR makes Get() respect sequence-number-based
      snapshot.
      
      Solution is simple. Besides using <ukey, ts, seq> to search the index for the key,
      we also verify that the candidate result's seq is smaller than or equal to seq. This
      requires passing a seq via `GetContext`, which results in the majority of code
      change caused by this PR.
      
      Also added a few unit tests to demonstrate standard visibility during point lookup
      and range scan when timestamp and snapshot are both present.
      
      Test plan (devserver):
      ```
      make check
      $./db_bench --benchmarks=fillseq,readrandom -cache_size=$[64*1024*1024]
      ```
      Result
      this PR: readrandom   :       4.827 micros/op 207180 ops/sec;   22.9 MB/s (1000000 of 1000000 found)
      master:  readrandom   :       4.936 micros/op 202610 ops/sec;   22.4 MB/s (1000000 of 1000000 found)
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7227
      
      Reviewed By: ltamasi
      
      Differential Revision: D23015242
      
      Pulled By: riversand963
      
      fbshipit-source-id: ea7b85a728654553ba357d2e6a207b5e40f7376a
      d758273c
  9. 05 8月, 2020 1 次提交
  10. 10 7月, 2020 1 次提交
    • M
      More Makefile Cleanup (#7097) · c7c7b07f
      mrambacher 提交于
      Summary:
      Cleans up some of the dependencies on test code in the Makefile while building tools:
      - Moves the test::RandomString, DBBaseTest::RandomString into Random
      - Moves the test::RandomHumanReadableString into Random
      - Moves the DestroyDir method into file_utils
      - Moves the SetupSyncPointsToMockDirectIO into sync_point.
      - Moves the FaultInjection Env and FS classes under env
      
      These changes allow all of the tools to build without dependencies on test_util, thereby simplifying the build dependencies.  By moving the FaultInjection code, the dependency in db_stress on different libraries for debug vs release was eliminated.
      
      Tested both release and debug builds via Make and CMake for both static and shared libraries.
      
      More work remains to clean up how the tools are built and remove some unnecessary dependencies.  There is also more work that should be done to get the Makefile and CMake to align in their builds -- what is in the libraries and the sizes of the executables are different.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7097
      
      Reviewed By: riversand963
      
      Differential Revision: D22463160
      
      Pulled By: pdillinger
      
      fbshipit-source-id: e19462b53324ab3f0b7c72459dbc73165cc382b2
      c7c7b07f
  11. 03 7月, 2020 1 次提交
  12. 02 7月, 2020 1 次提交
  13. 04 6月, 2020 1 次提交
  14. 02 6月, 2020 1 次提交
  15. 29 5月, 2020 1 次提交
    • Y
      Add timestamp to delete (#6253) · 961c7590
      Yanqin Jin 提交于
      Summary:
      Preliminary user-timestamp support for delete.
      
      If ["a", ts=100] exists, you can delete it by calling `DB::Delete(write_options, key)` in which `write_options.timestamp` points to a `ts` higher than 100.
      
      Implementation
      A new ValueType, i.e. `kTypeDeletionWithTimestamp` is added for deletion marker with timestamp.
      The reason for a separate `kTypeDeletionWithTimestamp`: RocksDB may drop tombstones (keys with kTypeDeletion) when compacting them to the bottom level. This is OK and useful if timestamp is disabled. When timestamp is enabled, should we still reuse `kTypeDeletion`, we may drop the tombstone with a more recent timestamp, causing deleted keys to re-appear.
      
      Test plan (dev server)
      ```
      make check
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6253
      
      Reviewed By: ltamasi
      
      Differential Revision: D20995328
      
      Pulled By: riversand963
      
      fbshipit-source-id: a9e5c22968ad76f98e3dc6ee0151265a3f0df619
      961c7590
  16. 28 4月, 2020 1 次提交
  17. 12 4月, 2020 1 次提交
    • Y
      Fix release build (#6690) · eeb3cf3f
      Yanqin Jin 提交于
      Summary:
      Fix release build caused by variable defined but unused.
      
      Test plan (devserver)
      ```
      make release
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6690
      
      Reviewed By: cheng-chang
      
      Differential Revision: D20980571
      
      Pulled By: riversand963
      
      fbshipit-source-id: c3f3b13f81dce4bdb19876dc2e710d5902ff8a02
      eeb3cf3f
  18. 11 4月, 2020 2 次提交
    • Y
      Compaction with timestamp: input boundaries (#6645) · 0c05624d
      Yanqin Jin 提交于
      Summary:
      Towards making compaction logic compatible with user timestamp.
      When computing boundaries and overlapping ranges for inputs of compaction, We need to compare SSTs by user key without timestamp.
      
      Test plan (devserver):
      ```
      make check
      ```
      Several individual tests:
      ```
      ./version_set_test --gtest_filter=VersionStorageInfoTimestampTest.GetOverlappingInputs
      ./db_with_timestamp_compaction_test
      ./db_with_timestamp_basic_test
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6645
      
      Reviewed By: ltamasi
      
      Differential Revision: D20960012
      
      Pulled By: riversand963
      
      fbshipit-source-id: ad377fa9eb481bf7a8a3e1824aaade48cdc653a4
      0c05624d
    • H
      make iterator return versions between timestamp bounds (#6544) · 9e89ffb7
      Huisheng Liu 提交于
      Summary:
      (Based on Yanqin's idea) Add a new field in readoptions as lower timestamp bound for iterator. When the parameter is not supplied (nullptr), the iterator returns the latest visible version of a record. When it is supplied, the existing timestamp field is the upper bound. Together the two serves as a bounded time window. The iterator returns all versions of a record falling in the window.
      
      SeekRandom perf test (10 minutes) on the same development machine ram drive with the same DB data shows no regression (within marge of error). The test is adapted from https://github.com/facebook/rocksdb/wiki/RocksDB-In-Memory-Workload-Performance-Benchmarks.
      base line (commit e860f884):
      seekrandom   : 7.836 micros/op 4082449 ops/sec; (0 of 73481999 found)
      This PR:
      seekrandom   : 7.764 micros/op 4120935 ops/sec; (0 of 71303999 found)
      
      db_bench --db=r:\rocksdb.github --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --cache_size=2147483648 --cache_numshardbits=6 --compression_type=none --compression_ratio=1 --min_level_to_compress=-1 --disable_seek_compaction=1 --hard_rate_limit=2 --write_buffer_size=134217728 --max_write_buffer_number=2 --level0_file_num_compaction_trigger=8 --target_file_size_base=134217728 --max_bytes_for_level_base=1073741824 --disable_wal=0 --wal_dir=r:\rocksdb.github\WAL_LOG --sync=0 --verify_checksum=1 --statistics=0 --stats_per_interval=0 --stats_interval=1048576 --histogram=0 --use_plain_table=1 --open_files=-1 --memtablerep=prefix_hash --bloom_bits=10 --bloom_locality=1 --duration=600 --benchmarks=seekrandom --use_existing_db=1 --num=25000000 --threads=32 --allow_concurrent_memtable_write=0
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6544
      
      Reviewed By: ltamasi
      
      Differential Revision: D20844069
      
      Pulled By: riversand963
      
      fbshipit-source-id: d97f2bf38a323c8c6a68db213b2d3c694b1c1f74
      9e89ffb7
  19. 02 4月, 2020 1 次提交
    • Z
      Add pipelined & parallel compression optimization (#6262) · 03a781a9
      Ziyue Yang 提交于
      Summary:
      This PR adds support for pipelined & parallel compression optimization for `BlockBasedTableBuilder`. This optimization makes block building, block compression and block appending a pipeline, and uses multiple threads to accelerate block compression. Users can set `CompressionOptions::parallel_threads` greater than 1 to enable compression parallelism.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6262
      
      Reviewed By: ajkr
      
      Differential Revision: D20651306
      
      fbshipit-source-id: 62125590a9c15b6d9071def9dc72589c1696a4cb
      03a781a9
  20. 25 3月, 2020 1 次提交
    • H
      multiget support for timestamps (#6483) · a6ce5c82
      Huisheng Liu 提交于
      Summary:
      Add timestamp support for MultiGet().
      timestamp from readoptions is honored, and timestamps can be returned along with values.
      
      MultiReadRandom perf test (10 minutes) on the same development machine ram drive with the same DB data shows no regression (within marge of error). The test is adapted from https://github.com/facebook/rocksdb/wiki/RocksDB-In-Memory-Workload-Performance-Benchmarks.
      base line (commit 17bef7d3):
        multireadrandom :     104.173 micros/op 307167 ops/sec; (5462999 of 5462999 found)
      This PR:
        multireadrandom :     104.199 micros/op 307095 ops/sec; (5307999 of 5307999 found)
      
      .\db_bench --db=r:\rocksdb.github --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --cache_size=2147483648 --cache_numshardbits=6 --compression_type=none --compression_ratio=1 --min_level_to_compress=-1 --disable_seek_compaction=1 --hard_rate_limit=2 --write_buffer_size=134217728 --max_write_buffer_number=2 --level0_file_num_compaction_trigger=8 --target_file_size_base=134217728 --max_bytes_for_level_base=1073741824 --disable_wal=0 --wal_dir=r:\rocksdb.github\WAL_LOG --sync=0 --verify_checksum=1 --statistics=0 --stats_per_interval=0 --stats_interval=1048576 --histogram=0 --use_plain_table=1 --open_files=-1 --memtablerep=prefix_hash --bloom_bits=10 --bloom_locality=1 --duration=600 --benchmarks=multireadrandom --use_existing_db=1 --num=25000000 --threads=32 --allow_concurrent_memtable_write=0
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6483
      
      Reviewed By: anand1976
      
      Differential Revision: D20498373
      
      Pulled By: riversand963
      
      fbshipit-source-id: 8505f22bc40fd791bc7dd05e48d7e67c91edb627
      a6ce5c82
  21. 18 3月, 2020 1 次提交
  22. 14 3月, 2020 1 次提交