1. 19 8月, 2015 1 次提交
    • A
      [Parallel L0-L1 Compaction Prep]: Giving Subcompactions Their Own State · f0da6977
      Ari Ekmekji 提交于
      Summary:
      In prepration for running multiple threads at the same time during
      a compaction job, this patch assigns each subcompaction its own state
      (instead of sharing the one global CompactionState). Each subcompaction then
      uses this state to update its statistics, keep track of its snapshots, etc.
      during the course of execution. Then at the end of all the executions the
      statistics are aggregated across the subcompactions so that the final result
      is the same as if only one larger compaction had run.
      
      Test Plan: ./db_test  ./db_compaction_test  ./compaction_job_test
      
      Reviewers: sdong, anthony, igor, noetzli, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: MarkCallaghan, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43239
      f0da6977
  2. 12 8月, 2015 1 次提交
    • A
      Removing duplicate code in db_bench/db_stress, fixing typos · 4249f159
      Andres Notzli 提交于
      Summary:
      While working on single delete support for db_bench, I realized that
      db_bench/db_stress contain a bunch of duplicate code related to
      copmression and found some typos. This patch removes duplicate code,
      typos and a redundant #ifndef in internal_stats.cc.
      
      Test Plan: make db_stress && make db_bench && ./db_bench --benchmarks=compress,uncompress
      
      Reviewers: yhchiang, sdong, rven, anthony, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D43965
      4249f159
  3. 01 8月, 2015 1 次提交
  4. 18 7月, 2015 1 次提交
    • I
      Don't let flushes preempt compactions · 35ca5936
      Igor Canadi 提交于
      Summary:
      When we first started, max_background_flushes was 0 by default and compaction thread was executing flushes (since there was no flush thread). Then, we switched the default max_background_flushes to 1. However, we still support the case where there is no flush thread and flushes are done in compaction. This is making our code a bit more complicated. By not supporting this use-case we can make our code simpler.
      
      We have a special case that when you set max_background_flushes to 0, we
      schedule the flush to execute on the compaction thread.
      
      Test Plan: make check (there might be some unit tests that depend on this behavior)
      
      Reviewers: IslamAbdelRahman, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D41931
      35ca5936
  5. 14 7月, 2015 2 次提交
    • I
      Deprecate purge_redundant_kvs_while_flush · a9c51095
      Igor Canadi 提交于
      Summary: This option is guarding the feature implemented 2 and a half years ago: D8991. The feature was enabled by default back then and has been running without issues. There is no reason why any client would turn this feature off. I found no reference in fbcode.
      
      Test Plan: none
      
      Reviewers: sdong, yhchiang, anthony, dhruba
      
      Reviewed By: dhruba
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D42063
      a9c51095
    • S
      "make format" against last 10 commits · f9728640
      sdong 提交于
      Summary: This helps Windows port to format their changes, as discussed. Might have formatted some other codes too becasue last 10 commits include more.
      
      Test Plan: Build it.
      
      Reviewers: anthony, IslamAbdelRahman, kradhakrishnan, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D41961
      f9728640
  6. 02 7月, 2015 1 次提交
    • D
      Windows Port from Microsoft · 18285c1e
      Dmitri Smirnov 提交于
       Summary: Make RocksDb build and run on Windows to be functionally
       complete and performant. All existing test cases run with no
       regressions. Performance numbers are in the pull-request.
      
       Test plan: make all of the existing unit tests pass, obtain perf numbers.
      
       Co-authored-by: Praveen Rao praveensinghrao@outlook.com
       Co-authored-by: Sherlock Huang baihan.huang@gmail.com
       Co-authored-by: Alex Zinoviev alexander.zinoviev@me.com
       Co-authored-by: Dmitri Smirnov dmitrism@microsoft.com
      18285c1e
  7. 06 6月, 2015 1 次提交
  8. 03 6月, 2015 1 次提交
    • Y
      Add EventListener::OnTableFileCreated() · fc838212
      Yueh-Hsuan Chiang 提交于
      Summary:
      Add EventListener::OnTableFileCreated(), which will be called
      when a table file is created.  This patch is part of the
      EventLogger and EventListener integration.
      
      Test Plan: Augment existing test in db/listener_test.cc
      
      Reviewers: anthony, kradhakrishnan, rven, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D38865
      fc838212
  9. 31 5月, 2015 1 次提交
  10. 30 5月, 2015 3 次提交
  11. 29 5月, 2015 1 次提交
    • A
      Support saving history in memtable_list · c8153510
      agiardullo 提交于
      Summary:
      For transactions, we are using the memtables to validate that there are no write conflicts.  But after flushing, we don't have any memtables, and transactions could fail to commit.  So we want to someone keep around some extra history to use for conflict checking.  In addition, we want to provide a way to increase the size of this history if too many transactions fail to commit.
      
      After chatting with people, it seems like everyone prefers just using Memtables to store this history (instead of a separate history structure).  It seems like the best place for this is abstracted inside the memtable_list.  I decide to create a separate list in MemtableListVersion as using the same list complicated the flush/installalflushresults logic too much.
      
      This diff adds a new parameter to control how much memtable history to keep around after flushing.  However, it sounds like people aren't too fond of adding new parameters.  So I am making the default size of flushed+not-flushed memtables be set to max_write_buffers.  This should not change the maximum amount of memory used, but make it more likely we're using closer the the limit.  (We are now postponing deleting flushed memtables until the max_write_buffer limit is reached).  So while we might use more memory on average, we are still obeying the limit set (and you could argue it's better to go ahead and use up memory now instead of waiting for a write stall to happen to test this limit).
      
      However, if people are opposed to this default behavior, we can easily set it to 0 and require this parameter be set in order to use transactions.
      
      Test Plan: Added a xfunc test to play around with setting different values of this parameter in all tests.  Added testing in memtablelist_test and planning on adding more testing here.
      
      Reviewers: sdong, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D37443
      c8153510
  12. 26 4月, 2015 1 次提交
  13. 25 4月, 2015 1 次提交
  14. 24 2月, 2015 1 次提交
  15. 15 1月, 2015 1 次提交
  16. 05 12月, 2014 2 次提交
    • Y
      Fix compile warning in db_stress · a5d4fc0a
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fix compile warning in db_stress
      
      Test Plan:
      make db_stress
      a5d4fc0a
    • Y
      Fix compile warning in db_stress.cc on Mac · 97c19408
      Yueh-Hsuan Chiang 提交于
      Summary:
      Fix the following compile warning in db_stress.cc on Mac
      tools/db_stress.cc:1688:52: error: format specifies type 'unsigned long' but the argument has type '::google::uint64' (aka 'unsigned long long') [-Werror,-Wformat]
          fprintf(stdout, "DB-write-buffer-size: %lu\n", FLAGS_db_write_buffer_size);
                                                 ~~~     ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 %llu
      
      Test Plan:
      make
      97c19408
  17. 03 12月, 2014 1 次提交
    • J
      Enforce write buffer memory limit across column families · a14b7873
      Jonah Cohen 提交于
      Summary:
      Introduces a new class for managing write buffer memory across column
      families.  We supplement ColumnFamilyOptions::write_buffer_size with
      ColumnFamilyOptions::write_buffer, a shared pointer to a WriteBuffer
      instance that enforces memory limits before flushing out to disk.
      
      Test Plan: Added SharedWriteBuffer unit test to db_test.cc
      
      Reviewers: sdong, rven, ljin, igor
      
      Reviewed By: igor
      
      Subscribers: tnovak, yhchiang, dhruba, xjin, MarkCallaghan, yoshinorim
      
      Differential Revision: https://reviews.facebook.net/D22581
      a14b7873
  18. 25 11月, 2014 1 次提交
  19. 15 11月, 2014 1 次提交
    • S
      Make db_stress built for ROCKSDB_LITE · a177742a
      sdong 提交于
      Summary:
      Make db_stress built for ROCKSDB_LITE.
      The test doesn't pass tough. It seg fault quickly. But I took a look and it doesn't seem to be related to lite version. Likely to be a bug inside RocksDB.
      
      Test Plan: make db_stress
      
      Reviewers: yhchiang, rven, ljin, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D28797
      a177742a
  20. 12 11月, 2014 1 次提交
    • I
      Turn on -Wshorten-64-to-32 and fix all the errors · 767777c2
      Igor Canadi 提交于
      Summary:
      We need to turn on -Wshorten-64-to-32 for mobile. See D1671432 (internal phabricator) for details.
      
      This diff turns on the warning flag and fixes all the errors. There were also some interesting errors that I might call bugs, especially in plain table. Going forward, I think it makes sense to have this flag turned on and be very very careful when converting 64-bit to 32-bit variables.
      
      Test Plan: compiles
      
      Reviewers: ljin, rven, yhchiang, sdong
      
      Reviewed By: yhchiang
      
      Subscribers: bobbaldwin, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28689
      767777c2
  21. 09 11月, 2014 1 次提交
  22. 08 11月, 2014 1 次提交
    • I
      Fix -Wshadow for tools · 68effa03
      Igor Canadi 提交于
      Summary: Previously I made `make check` work with -Wshadow, but there are some tools that are not compiled using `make check`.
      
      Test Plan: make all
      
      Reviewers: yhchiang, rven, ljin, sdong
      
      Reviewed By: ljin, sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28497
      68effa03
  23. 05 11月, 2014 1 次提交
  24. 01 11月, 2014 1 次提交
    • V
      Add support for in place update for db_stress · 7e01d120
      Venkatesh Radhakrishnan 提交于
      Summary:
      Added two flags which operate as follows:
      in_place_update: enable in_place_update for default column family
      set_in_place_one_in: toggles the value of the option inplace_update_support with a probability of 1/N
      
      Test Plan:
      Run db_stress with the two flags above set.
      Specifically tried in_place_update set to true and set_in_place_one_in set to 10,000.
      
      Reviewers: ljin, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28029
      7e01d120
  25. 28 10月, 2014 1 次提交
  26. 09 9月, 2014 1 次提交
    • F
      Implement full filter for block based table. · 0af157f9
      Feng Zhu 提交于
      Summary:
      1. Make filter_block.h a base class. Derive block_based_filter_block and full_filter_block. The previous one is the traditional filter block. The full_filter_block is newly added. It would generate a filter block that contain all the keys in SST file.
      
      2. When querying a key, table would first check if full_filter is available. If not, it would go to the exact data block and check using block_based filter.
      
      3. User could choose to use full_filter or tradional(block_based_filter). They would be stored in SST file with different meta index name. "filter.filter_policy" or "full_filter.filter_policy". Then, Table reader is able to know the fllter block type.
      
      4. Some optimizations have been done for full_filter_block, thus it requires a different interface compared to the original one in filter_policy.h.
      
      5. Actual implementation of filter bits coding/decoding is placed in util/bloom_impl.cc
      
      Benchmark: base commit 1d23b5c4
      Command:
      db_bench --db=/dev/shm/rocksdb --num_levels=6 --key_size=20 --prefix_size=20 --keys_per_prefix=0 --value_size=100 --write_buffer_size=134217728 --max_write_buffer_number=2 --target_file_size_base=33554432 --max_bytes_for_level_base=1073741824 --verify_checksum=false --max_background_compactions=4 --use_plain_table=0 --memtablerep=prefix_hash --open_files=-1 --mmap_read=1 --mmap_write=0 --bloom_bits=10 --bloom_locality=1 --memtable_bloom_bits=500000 --compression_type=lz4 --num=393216000 --use_hash_search=1 --block_size=1024 --block_restart_interval=16 --use_existing_db=1 --threads=1 --benchmarks=readrandom —disable_auto_compactions=1
      Read QPS increase for about 30% from 2230002 to 2991411.
      
      Test Plan:
      make all check
      valgrind db_test
      db_stress --use_block_based_filter = 0
      ./auto_sanity_test.sh
      
      Reviewers: igor, yhchiang, ljin, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D20979
      0af157f9
  27. 03 9月, 2014 1 次提交
  28. 26 8月, 2014 1 次提交
  29. 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
  30. 14 7月, 2014 1 次提交
  31. 02 7月, 2014 1 次提交
  32. 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
  33. 07 6月, 2014 1 次提交
    • I
      Create Missing Column Families · a0191c9d
      Igor Canadi 提交于
      Summary: Provide an convenience option to create column families if they are missing from the DB. Task #4460490
      
      Test Plan: added unit test. also, stress test for some time
      
      Reviewers: sdong, haobo, dhruba, ljin, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: yhchiang, leveldb
      
      Differential Revision: https://reviews.facebook.net/D18951
      a0191c9d
  34. 03 6月, 2014 1 次提交
  35. 09 5月, 2014 1 次提交
  36. 29 4月, 2014 1 次提交