1. 24 8月, 2017 2 次提交
    • A
      allow nullptr Slice only as sentinel · 234f33a3
      Andrew Kryczka 提交于
      Summary:
      Allow `Slice` holding nullptr as a sentinel value but not in comparisons. This new restriction eliminates the need for the manual checks in 39ef9005, while still conforming to glibc's `memcmp` API. Thanks siying for the idea. Users may need to migrate, so mentioned it in HISTORY.md.
      Closes https://github.com/facebook/rocksdb/pull/2777
      
      Differential Revision: D5686016
      
      Pulled By: ajkr
      
      fbshipit-source-id: 03a2ca3fd9a0ebade9d0d5686c81d59a9534f563
      234f33a3
    • M
      Use PinnableSlice in Transactions · ccf7f833
      Maysam Yabandeh 提交于
      Summary:
      The ::Get from DB is not augmented with an overload method that takes a PinnableSlice instead of a string. Transactions however are not yet upgraded to use the new API. As a result, transaction users such as MyRocks cannot benefit from it. This patch updates the transactional API with a PinnableSlice overload.
      Closes https://github.com/facebook/rocksdb/pull/2736
      
      Differential Revision: D5645770
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: f6af520df902f842de1bcf99bed3e8dfc43ad96d
      ccf7f833
  2. 23 8月, 2017 3 次提交
  3. 22 8月, 2017 3 次提交
  4. 21 8月, 2017 2 次提交
    • Y
      Blob db create a snapshot before every read · 5b68b114
      yiwu-arbug 提交于
      Summary:
      If GC kicks in between
      
      * A Get() reads index entry from base db.
      * The Get() read from a blob file
      
      The GC can delete the corresponding blob file, making the key not found. Fortunately we have existing logic to avoid deleting a blob file if it is referenced by a snapshot. So the fix is to explicitly create a snapshot before reading index entry from base db.
      Closes https://github.com/facebook/rocksdb/pull/2754
      
      Differential Revision: D5655956
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: e4ccbc51331362542e7343175bbcbdea5830f544
      5b68b114
    • Y
      GC the oldest file when out of space · 4624ae52
      yiwu-arbug 提交于
      Summary:
      When out of space, blob db should GC the oldest file. The current implementation GC the newest one instead. Fixing it.
      Closes https://github.com/facebook/rocksdb/pull/2757
      
      Differential Revision: D5657611
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 56c30a4c52e6ab04551dda8c5c46006d4070b28d
      4624ae52
  5. 20 8月, 2017 1 次提交
  6. 19 8月, 2017 4 次提交
  7. 18 8月, 2017 4 次提交
  8. 17 8月, 2017 6 次提交
    • S
      Allow merge operator to be called even with a single operand · 9a44b4c3
      Sagar Vemuri 提交于
      Summary:
      Added a function `MergeOperator::DoesAllowSingleMergeOperand()` to allow invoking a merge operator even with a single merge operand, if overriden.
      
      This is needed for Cassandra-on-RocksDB work. All Cassandra writes are through merges and this will allow a single merge-value to be updated in the merge-operator invoked via a compaction, if needed, due to an expired TTL.
      Closes https://github.com/facebook/rocksdb/pull/2721
      
      Differential Revision: D5608706
      
      Pulled By: sagar0
      
      fbshipit-source-id: f299f9f91c4d1ac26e48bd5906e122c1c5e5f3fc
      9a44b4c3
    • F
      fix some misspellings · ac8fb77a
      follitude 提交于
      Summary:
      PTAL ajkr
      Closes https://github.com/facebook/rocksdb/pull/2750
      
      Differential Revision: D5648052
      
      Pulled By: ajkr
      
      fbshipit-source-id: 7cd1ddd61364d5a55a10fdd293fa74b2bf89dd98
      ac8fb77a
    • A
      minor improvements to db_stress · 23593171
      Andrew Kryczka 提交于
      Summary:
      fix some things that made this command hard to use from CLI:
      
      - use default values for `target_file_size_base` and `max_bytes_for_level_base`. previously we were using small values for these but default value of `write_buffer_size`, which led to enormous number of L1 files.
      - failure message for `value_size_mult` too big. previously there was just an assert, so in non-debug mode it'd overrun the value buffer and crash mysteriously.
      - only print verification success if there's no failure. before it'd print both in the failure case.
      - support `memtable_prefix_bloom_size_ratio`
      - support `num_bottom_pri_threads` (universal compaction)
      Closes https://github.com/facebook/rocksdb/pull/2741
      
      Differential Revision: D5629495
      
      Pulled By: ajkr
      
      fbshipit-source-id: ddad97d6d4ba0884e7c0f933b0a359712514fc1d
      23593171
    • A
      fix deleterange with memtable prefix bloom · af012c0f
      Andrew Kryczka 提交于
      Summary:
      the range delete tombstones in memtable should be added to the aggregator even when the memtable's prefix bloom filter tells us the lookup key's not there. This bug could cause data to temporarily reappear until the memtable containing range deletions is flushed.
      
      Reported in #2743.
      Closes https://github.com/facebook/rocksdb/pull/2745
      
      Differential Revision: D5639007
      
      Pulled By: ajkr
      
      fbshipit-source-id: 04fc6facb6f978340a3f639536f4ca7c0d73dfc9
      af012c0f
    • A
      update scores after picking universal compaction · 1c8dbe2a
      Andrew Kryczka 提交于
      Summary:
      We forgot to recompute compaction scores after picking a universal compaction like we do in level compaction (https://github.com/facebook/rocksdb/blob/a34b2e388ee51173e44f6aa290f1301c33af9e67/db/compaction_picker.cc#L691-L695). This leads to a fairness issue where we waste compactions on CFs/DB instances that don't need it while others can starve.
      
      Previously, ccecf3f4 fixed the issue for the read-amp-based compaction case; this PR avoids the issue earlier and also for size-ratio-based compactions.
      Closes https://github.com/facebook/rocksdb/pull/2688
      
      Differential Revision: D5566191
      
      Pulled By: ajkr
      
      fbshipit-source-id: 010bccb2a107f6a76f3d3022b90aadce5cc48feb
      1c8dbe2a
    • M
      Update WritePrepared with the pseudo code · eb642530
      Maysam Yabandeh 提交于
      Summary:
      Implement the main body of WritePrepared pseudo code. This includes PrepareInternal and CommitInternal, as well as AddCommitted which updates the commit map. It also provides a IsInSnapshot method that could be later called form the read path to decide if a version is in the read snapshot or it should other be skipped.
      
      This patch lacks unit tests and does not attempt to offer an efficient implementation. The idea is that to have the API specified so that we can work on related tasks in parallel.
      Closes https://github.com/facebook/rocksdb/pull/2713
      
      Differential Revision: D5640021
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: bfa7a05e8d8498811fab714ce4b9c21530514e1c
      eb642530
  9. 16 8月, 2017 4 次提交
  10. 15 8月, 2017 3 次提交
  11. 14 8月, 2017 4 次提交
  12. 13 8月, 2017 1 次提交
  13. 12 8月, 2017 3 次提交
    • A
      fix deletion dropping in intra-L0 · acf935e4
      Andrew Kryczka 提交于
      Summary:
      `KeyNotExistsBeyondOutputLevel` didn't consider L0 files' key-ranges. So if a key only was covered by older L0 files' key-ranges, we would incorrectly drop deletions of that key. This PR just skips the deletion-dropping optimization when output level is L0.
      Closes https://github.com/facebook/rocksdb/pull/2726
      
      Differential Revision: D5617286
      
      Pulled By: ajkr
      
      fbshipit-source-id: 4bff1396b06d49a828ba4542f249191052915bce
      acf935e4
    • A
      make sst_dump compression size command consistent · 8254e9b5
      Andrew Kryczka 提交于
      Summary:
      - like other subcommands, reporting compression sizes should be specified with the `--command` CLI arg.
      - also added `--compression_types` arg as it's useful to restrict the types of compression used, at least in my dictionary compression experiments.
      Closes https://github.com/facebook/rocksdb/pull/2706
      
      Differential Revision: D5589520
      
      Pulled By: ajkr
      
      fbshipit-source-id: 305bb4ebcc95eecc8a85523cd3b1050619c9ddc5
      8254e9b5
    • A
      db_bench support for non-uniform column family ops · 74f18c13
      Andrew Kryczka 提交于
      Summary:
      Previously we could only select the CF on which to operate uniformly at random. This is a limitation, e.g., when testing universal compaction as all CFs would need to run full compaction at roughly the same time, which isn't realistic.
      
      This PR allows the user to specify the probability distribution for selecting CFs via the `--column_family_distribution` argument.
      Closes https://github.com/facebook/rocksdb/pull/2677
      
      Differential Revision: D5544436
      
      Pulled By: ajkr
      
      fbshipit-source-id: 478d56260995236ae90895ce5bd51f38882e185a
      74f18c13