1. 27 2月, 2015 1 次提交
    • I
      rocksdb: Add missing override · 62247ffa
      Igor Sugak 提交于
      Summary:
      When using latest clang (3.6 or 3.7/trunck) rocksdb is failing with many errors. Almost all of them are missing override errors. This diff adds missing override keyword. No manual changes.
      
      Prerequisites: bear and clang 3.5 build with extra tools
      
      ```lang=bash
      % USE_CLANG=1 bear make all # generate a compilation database http://clang.llvm.org/docs/JSONCompilationDatabase.html
      % clang-modernize -p . -include . -add-override
      % make format
      ```
      
      Test Plan:
      Make sure all tests are passing.
      ```lang=bash
      % #Use default fb code clang.
      % make check
      ```
      Verify less error and no missing override errors.
      ```lang=bash
      % # Have trunk clang present in path.
      % ROCKSDB_NO_FBCODE=1 CC=clang CXX=clang++ make
      ```
      
      Reviewers: igor, kradhakrishnan, rven, meyering, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D34077
      62247ffa
  2. 24 2月, 2015 1 次提交
  3. 12 2月, 2015 1 次提交
  4. 28 1月, 2015 1 次提交
    • I
      Remove blob store from the codebase · e8bf2310
      Igor Canadi 提交于
      Summary: We don't have plans to work on this in the short term. If we ever resurrect the project, we can find the code in the history. No need for it to linger around
      
      Test Plan: no test
      
      Reviewers: yhchiang, rven, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D32349
      e8bf2310
  5. 15 1月, 2015 3 次提交
    • I
      Change db_stress to work with format_version == 2 · 2bb05900
      Igor Canadi 提交于
      2bb05900
    • I
      New BlockBasedTable version -- better compressed block format · 9ab5adfc
      Igor Canadi 提交于
      Summary:
      This diff adds BlockBasedTable format_version = 2. New format version brings better compressed block format for these compressions:
      1) Zlib -- encode decompressed size in compressed block header
      2) BZip2 -- encode decompressed size in compressed block header
      3) LZ4 and LZ4HC -- instead of doing memcpy of size_t encode size as varint32. memcpy is very bad because the DB is not portable accross big/little endian machines or even platforms where size_t might be 8 or 4 bytes.
      
      It does not affect format for snappy.
      
      If you write a new database with format_version = 2, it will not be readable by RocksDB versions before 3.10. DB::Open() will return corruption in that case.
      
      Test Plan:
      Added a new test in db_test.
      I will also run db_bench and verify VSIZE when block_cache == 1GB
      
      Reviewers: yhchiang, rven, MarkCallaghan, dhruba, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31461
      9ab5adfc
    • I
      Add LZ4 compression to sanity test · 516a0426
      Igor Canadi 提交于
      Summary: This will be used to test format changes in https://reviews.facebook.net/D31461
      
      Test Plan: run it
      
      Reviewers: MarkCallaghan, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D31515
      516a0426
  6. 06 1月, 2015 1 次提交
    • L
      benchmark.sh won't run through all tests properly if one specifies wal_dir to... · 9d5bd411
      Leonidas Galanis 提交于
      benchmark.sh won't run through all tests properly if one specifies wal_dir to be different than db directory.
      
      Summary:
      A command line like this to run all the tests:
      source benchmark.config.sh && nohup ./benchmark.sh 'bulkload,fillseq,overwrite,filluniquerandom,readrandom,readwhilewriting'
      where
      benchmark.config.sh is:
      export DB_DIR=/data/mysql/rocksdata
      export WAL_DIR=/txlogs/rockswal
      export OUTPUT_DIR=/root/rocks_benchmarking/output
      
      Will fail for the tests that need a new DB .
      
      Also 1) set disable_data_sync=0 and 2) add debug mode to run through all the tests more quickly
      
      Test Plan: run ./benchmark.sh 'debug,bulkload,fillseq,overwrite,filluniquerandom,readrandom,readwhilewriting' and verify that there are no complaints about WAL dir not being empty.
      
      Reviewers: sdong, yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D30909
      9d5bd411
  7. 13 12月, 2014 1 次提交
    • Q
      Added 'dump_live_files' command to ldb tool. · cef6f843
      Qiao Yang 提交于
      Summary:
      Priliminary diff to solicit comments.
      Given DB path, dump all SST files (key/value and properties), WAL file and manifest
      files. What command options do we need to support for this command? Maybe
      output_hex for keys?
      
      Test Plan: Create additional ldb unit tests.
      
      Reviewers: sdong, rven
      
      Reviewed By: rven
      
      Subscribers: dhruba
      
      Differential Revision: https://reviews.facebook.net/D29547
      cef6f843
  8. 11 12月, 2014 1 次提交
  9. 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
  10. 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
  11. 25 11月, 2014 1 次提交
  12. 21 11月, 2014 1 次提交
    • S
      first rdb commit · bafce619
      Saghm Rossi 提交于
      Summary: First commit for rdb shell
      
      Test Plan: unit_test.js does simple assertions on most of the main functionality; will update with rest of tests
      
      Reviewers: igor, rven, lijn, yhciang, sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D28749
      bafce619
  13. 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
  14. 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
  15. 09 11月, 2014 1 次提交
  16. 08 11月, 2014 2 次提交
  17. 05 11月, 2014 1 次提交
  18. 01 11月, 2014 3 次提交
  19. 28 10月, 2014 3 次提交
    • I
      remove atomic_pointer.h references · c1c68bce
      Igor Canadi 提交于
      c1c68bce
    • I
      Deprecate AtomicPointer · 48842ab3
      Igor Canadi 提交于
      Summary: RocksDB already depends on C++11, so we might as well all the goodness that C++11 provides. This means that we don't need AtomicPointer anymore. The less things in port/, the easier it will be to port to other platforms.
      
      Test Plan: make check + careful visual review verifying that NoBarried got memory_order_relaxed, while Acquire/Release methods got memory_order_acquire and memory_order_release
      
      Reviewers: rven, yhchiang, ljin, sdong
      
      Reviewed By: ljin
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D27543
      48842ab3
    • L
      db_stress for dynamic options · 714c63c5
      Lei Jin 提交于
      Summary: Allow SetOptions() during db_stress test
      
      Test Plan: make crash_test
      
      Reviewers: sdong, yhchiang, rven, igor
      
      Reviewed By: igor
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D25497
      714c63c5
  20. 11 10月, 2014 1 次提交
  21. 19 9月, 2014 1 次提交
  22. 13 9月, 2014 1 次提交
    • L
      standardize scripts to run RocksDB benchmarks · add22e35
      Lei Jin 提交于
      Summary:
      Hope these scripts will allow people to run/repro benchmark easily
      I think it is time to re-run flash benchmarks and report results
      Please comment if any other benchmark runs are needed
      
      Test Plan: ran it
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: igor
      
      Subscribers: dhruba, MarkCallaghan, leveldb
      
      Differential Revision: https://reviews.facebook.net/D23139
      add22e35
  23. 09 9月, 2014 2 次提交
    • I
      Explicitly cast char to signed char in Hash() · 88841bd0
      Igor Canadi 提交于
      Summary:
      The compilers we use treat char as signed. However, this is not guarantee of C standard and some compilers (for ARM platform for example), treat char as unsigned. Code that assumes that char is either signed or unsigned is wrong.
      
      This change explicitly casts the char to signed version. This will not break any of our use cases on x86, which, I believe are all of them. In case somebody out there is using RocksDB on ARM AND using bloom filters, they're going to have a bad time. However, it is very unlikely that this is the case.
      
      Test Plan: sanity test with previous commit (with new sanity test)
      
      Reviewers: yhchiang, ljin, sdong
      
      Reviewed By: ljin
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D22767
      88841bd0
    • 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
  24. 05 9月, 2014 1 次提交
    • L
      introduce ImmutableOptions · 5665e5e2
      Lei Jin 提交于
      Summary:
      As a preparation to support updating some options dynamically, I'd like
      to first introduce ImmutableOptions, which is a subset of Options that
      cannot be changed during the course of a DB lifetime without restart.
      
      ColumnFamily will keep both Options and ImmutableOptions. Any component
      below ColumnFamily should only take ImmutableOptions in their
      constructor. Other options should be taken from APIs, which will be
      allowed to adjust dynamically.
      
      I am yet to make changes to memtable and other related classes to take
      ImmutableOptions in their ctor. That can be done in a seprate diff as
      this one is already pretty big.
      
      Test Plan: make all check
      
      Reviewers: yhchiang, igor, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D22545
      5665e5e2
  25. 03 9月, 2014 1 次提交
  26. 26 8月, 2014 1 次提交
  27. 15 8月, 2014 1 次提交
    • F
      fix_sst_dump_for_old_sst_format · 6c4c159b
      Feng Zhu 提交于
      Summary:
      1. fix segment error when dumping old sst format (no properties nor stats)
      2. Enable dumpping old sst format
      
      Test Plan:
      Generate block based sst file with "properties", and one with "stats" and one without neither.
      Read it using sst_dump
      
      Reviewers: ljin, igor, yhchiang, dhruba, sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D21837
      6c4c159b
  28. 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
  29. 18 7月, 2014 1 次提交
  30. 14 7月, 2014 1 次提交
  31. 11 7月, 2014 1 次提交
    • S
      Removing NewTotalOrderPlainTableFactory · 30c81e77
      Stanislau Hlebik 提交于
      Summary:
      Seems like NewTotalOrderPlainTableFactory is useless and is semantically incorrect.
      Total order mode indicator is prefix_extractor == nullptr,
      but NewTotalOrderPlainTableFactory doesn't set it to be nullptr. That's why some tests
      in plain_table_db_tests is incorrect.
      
      Test Plan: make all check
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: leveldb
      
      Differential Revision: https://reviews.facebook.net/D19587
      30c81e77