1. 21 11月, 2013 4 次提交
  2. 20 11月, 2013 6 次提交
    • K
      fix issue #11 · 0142d38b
      kailiu 提交于
      URL: https://github.com/facebook/rocksdb/issues/11
      0142d38b
    • K
      Move flush_block_policy from Options to TableFactory · 6eb56498
      kailiu 提交于
      Summary:
      Previously we introduce a `flush_block_policy_factory` in Options, however, that options is strongly releated to Table based tables.
      It will make more sense to move it to block based table's own factory class.
      
      Test Plan: make check to pass existing tests
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14211
      6eb56498
    • I
      Fix two nasty use-after-free-bugs · 469a9f32
      Igor Canadi 提交于
      Summary:
      These bugs were caught by ASAN crash test.
      1. The first one, in table/filter_block.cc is very nasty. We first reference entries_ and store the reference to Slice prev. Then, we call entries_.append(), which can change the reference. The Slice prev now points to junk.
      2. The second one is a bug in a test, so it's not very serious. Once we set read_opts.prefix, we never clear it, so some other function might still reference it.
      
      Test Plan: asan crash test now runs more than 5 mins. Before, it failed immediately. I will run the full one, but the full one takes quite some time (5 hours)
      
      Reviewers: dhruba, haobo, kailiu
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14223
      469a9f32
    • I
      Split asan_check into asan_check and asan_crash_test · 8906ab59
      Igor Canadi 提交于
      8906ab59
    • I
      make asan_check · 92d90502
      Igor Canadi 提交于
      Summary: Add asan_check rule to Makefile. After we add this, we will create Jenkins run that will check for asan errors!
      
      Test Plan: make asan_check
      
      Reviewers: dhruba, kailiu, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14205
      92d90502
    • K
      Improve the "table stats" · 1415f882
      kailiu 提交于
      Summary:
      The primary motivation of the changes is to make it easier to figure out the inside of the tables.
      
      * rename "table stats" to "table properties" since now we have more than "integers" to store in the property block.
      * Add filter block size to the basic table properties.
      * Whenever a table is built, we'll log the table properties (the sample output is in Test Plan).
      * Make an api to expose deleted keys.
      
      Test Plan:
      Passed all existing test. and the sample output of table stats:
      
          ==================================================================
              Basic Properties
          ------------------------------------------------------------------
                        # data blocks: 1
                            # entries: 1
      
                         raw key size: 9
                 raw average key size: 9
                       raw value size: 9
               raw average value size: 0
      
                      data block size: 25
                     index block size: 27
                    filter block size: 18
               (estimated) table size: 70
      
                        filter policy: rocksdb.BuiltinBloomFilter
          ==================================================================
              User collected properties: InternalKeyPropertiesCollector
          ------------------------------------------------------------------
                          kDeletedKeys: 1
          ==================================================================
      
      Reviewers: dhruba, haobo
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14187
      1415f882
  3. 19 11月, 2013 10 次提交
  4. 18 11月, 2013 3 次提交
    • I
      Remove snappy from RocksDB distribution · ce26e9a5
      Igor Canadi 提交于
      Summary:
      Argumentation here: https://github.com/facebook/rocksdb/issues/9
      
      Even though we include snappy in the distribution, we do not link with it if we don't have snappy installed on the system.
      
      Installing snappy is easy nowadays, just type:
      sudo apt-get install libsnappy-dev
      
      Test Plan: compile on ubuntu
      
      Reviewers: dhruba, kailiu
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14133
      ce26e9a5
    • I
      Include <unistd.h> in db_test · fc614282
      Igor Canadi 提交于
      Summary: This is the only compile issue in Ubuntu. It might be better to include <unistd.h> only in env_posix and add Truncate function to Env, but since we use truncate only in db_test, I don't think it makes much sense.
      
      Test Plan: Rocksdb now compiles on Ubuntu!
      
      Reviewers: dhruba, kailiu
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14127
      fc614282
    • I
      Upgrading compiler to gcc4.8.1 · de9ce7d4
      Igor Canadi 提交于
      Summary:
      Finally did it - the trick was in using --dynamic-linker option. This is first step to running ASAN.
      
      All of our code seems to compile just fine on 4.8.1. However, I still left fbcode.471.sh in the 'build_tools/' just in case.
      
      Test Plan: make clean; make
      
      Reviewers: dhruba, haobo, kailiu, emayanke, sdong
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14109
      de9ce7d4
  5. 17 11月, 2013 6 次提交
    • K
      Change the logic in KeyMayExist() · 75df72f2
      Kai Liu 提交于
      Summary:
      Previously in KeyMayExist(), if DB::Get() returns non-Status::OK(), we assumes key may not exist.
      However, as if index block is not in block cache, Status::Incomplete() will return. Worse still, if
      options::filter_delete is enabled, we may falsely ignore the "delete" operation:
      
        https://github.com/facebook/rocksdb/blob/master/db/write_batch.cc#L217-L220
      
      This diff fixes this bug and will let crash-test pass.
      
      Test Plan:
      Ran:
      
        ./db_stress --test_batches_snapshots=1 --ops_per_thread=1000000 --threads=32 --write_buffer_size=4194304 --destroy_db_initially=1 --reopen=0 --readpercent=5 --prefixpercent=45 --writepercent=35 --delpercent=5 --iterpercent=10 --db=/home/kailiu/local/newer --max_key=100000000 --disable_seek_compaction=0 --mmap_read=0 --block_size=16384 --cache_size=1048576 --open_files=500000 --verify_checksum=1 --sync=0 --disable_wal=0 --disable_data_sync=0 --target_file_size_base=2097152
      --target_file_size_multiplier=2 --max_write_buffer_number=3 --max_background_compactions=20 --max_bytes_for_level_base=10485760 --filter_deletes=1
      
      Previously we'll see crash happens very soon.
      
      Reviewers: igor, dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14115
      75df72f2
    • K
      make util/env_posix.cc work under mac · 97d8e573
      kailiu 提交于
      Summary: This diff invoves some more complicated issues in the posix environment.
      
      Test Plan: works under mac os. will need to verify dev box.
      
      Reviewers: dhruba
      
      Reviewed By: dhruba
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14061
      97d8e573
    • K
      Make the options in table_builder/block_builder less misleading · 7604e2f7
      Kai Liu 提交于
      Summary:
      By original design, the regular `block options` and index `block options` in table_builder is mutable. We can use ChangeOptions to change the options directly.
      
      However, with my last change, `BlockBuilder` no longer hold the reference to the index_block_options -- as a result, any changes made after the creation of index block builder will be of no effect.
      
      But still the code is very error-prone and developers can easily fall into the trap without aware of it. To avoid this problem from happening in the future, I deleted the `ChangeOptions` and the `index_block_options`, as well as many other changes to make it less misleading.
      
      Test Plan:
      make
      make check
      make release
      
      Reviewers: dhruba, haobo
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13707
      7604e2f7
    • K
      Reformat CONTRIBUTING.md with less than 80 characters. · f7a2b972
      Kai Liu 提交于
      f7a2b972
    • I
      Merge pull request #5 from pborreli/typos · 72756c74
      Igor Canadi 提交于
      Fixed typos
      72756c74
    • I
      Added CONTRIBUTING.md · f4682721
      Igor Canadi 提交于
      f4682721
  6. 16 11月, 2013 5 次提交
    • P
      Fixed typos · 443e04e6
      Pascal Borreli 提交于
      443e04e6
    • S
      Add an option to table_reader_bench to access the table from DB And Iterating... · 55baa3d9
      Siying Dong 提交于
      Add an option to table_reader_bench to access the table from DB And Iterating non-existing prefix case.
      
      Summary: This patch adds an option to table_reader_bench that queries run against DB level (which has one table). It is useful if user wants to see the extra costs DB level introduces.
      
      Test Plan: Run the benchmark with and without the new parameter
      
      Reviewers: haobo, dhruba, kailiu
      
      Reviewed By: kailiu
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D13863
      55baa3d9
    • K
      Fix typo. · 3d56b069
      Kai Liu 提交于
      3d56b069
    • I
      Start DeleteFileTest with clean plate · 21905dd4
      Igor Canadi 提交于
      Summary:
      Remove all the files from the test dir before the test. The test failed when there were some old files still in the directory, since it checks the file counts.
      This is what caused jenkins' test failures. It was running fine on my machine so it was hard to repro.
      
      Test Plan:
      1. create an extra 000001.log file in the test directory
      2. run a ./deletefile_test - test failes
      3. patch ./deletefile_test with this
      4. test succeeds
      
      Reviewers: haobo, dhruba
      
      Reviewed By: haobo
      
      CC: leveldb
      
      Differential Revision: https://reviews.facebook.net/D14097
      21905dd4
    • K
      Fix a typo in README · bd828264
      Kai Liu 提交于
      bd828264
  7. 15 11月, 2013 4 次提交
  8. 14 11月, 2013 1 次提交
  9. 13 11月, 2013 1 次提交