1. 03 8月, 2016 2 次提交
    • J
      Add a GetComparator() function to the ColumnFamilyHandle base class so that... · cdc4eb68
      Jay Edgar 提交于
      Add a GetComparator() function to the ColumnFamilyHandle base class so that the user's comparator can be retrieved.
      
      Summary: MyRocks is adding support for the user of the SstFileWriter which needs a comparator.  It would be more convenient to get the comparator from the column family (which already has to have it) than to have caller keep track of it.
      
      Test Plan: Standard tests (adding one for the new method)
      
      Reviewers: IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61155
      cdc4eb68
    • K
      Build break fixes · 712dd27e
      krad 提交于
      Summary: Regex support for c++ is very inconsistent across compilers, converting
      the logic to simple string manipulation.
      
      Test Plan: Local test
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61377
      712dd27e
  2. 02 8月, 2016 6 次提交
    • I
      Fix parallel tests `make check -j` · 0155c73d
      Islam AbdelRahman 提交于
      Summary:
      parallel tests are broken because gnu_parallel is reading deprecated options from `/etc/parallel/config`
      Fix this by passing `--plain` to ignore `/etc/parallel/config`
      
      Test Plan: make check -j64
      
      Reviewers: kradhakrishnan, sdong, andrewkr, yiwu, arahut
      
      Reviewed By: arahut
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61359
      0155c73d
    • K
      Fix to enable running CI jobs locally · c49ea68c
      krad 提交于
      Summary:
      We may not have permission on all /dev/shm to fix the sticky bit.
      Making the sticky bit fix advisory.
      
      Test Plan: Run CI job locally
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61371
      c49ea68c
    • K
      Build break fix · 726c2f7e
      krad 提交于
      Summary:
      Fixing build break on Mac
      
      (1) uint64_t fix
      (2) O_DIRECT works only for Linux
      
      Test Plan: Build and test on Mac and Unix
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61353
      726c2f7e
    • O
      Experiments on column-aware encodings · d51dc96a
      omegaga 提交于
      Summary:
      Experiments on column-aware encodings. Supported features: 1) extract data blocks from SST file and encode with specified encodings; 2) Decode encoded data back into row format; 3) Directly extract data blocks and write in row format (without prefix encoding); 4) Get column distribution statistics for column format; 5) Dump data blocks separated by columns in human-readable format.
      
      There is still on-going work on this diff. More refactoring is necessary.
      
      Test Plan: Wrote tests in `column_aware_encoding_test.cc`. More tests should be added.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: arahut, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60027
      d51dc96a
    • K
      Persistent Read Cache (part 6) Block Cache Tier Implementation · c116b478
      krad 提交于
      Summary:
      The patch is a continuation of part 5. It glues the abstraction for
      file layout and metadata, and flush out the implementation of the API. It
      adds unit tests for the implementation.
      
      Test Plan: Run unit tests
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D57549
      c116b478
    • O
      Write a benchmark to emulate time series data · 64046e58
      omegaga 提交于
      Summary: Add a benchmark to `db_bench`. In this benchmark, a write thread will populate time series data in the format of 'id | timestamp', and multiple read threads will randomly retrieve all data from one id at a time.
      
      Test Plan: Run the benchmark: `num=134217728;bpl=536870912;mb=67108864;overlap=10;mcz=2;del=300000000;levels=6;ctrig=4;delay=8;stop=12;wbn=3;mbc=20;wbs=134217728;dds=0;sync=0;t=32;vs=800;bs=4096;cs=17179869184;of=500000;wps=0;si=10000000; kir=100000; dir=/data/users/jhli/test/; ./db_bench --benchmarks=timeseries --disable_seek_compaction=1 --mmap_read=0 --statistics=1 --histogram=1 --num=$num --threads=$t --value_size=$vs --block_size=$bs --cache_size=$cs --bloom_bits=10 --cache_numshardbits=6 --open_files=$of --verify_checksum=1 --db=$dir --sync=$sync --disable_wal=0 --compression_type=none --stats_interval=$si --compression_ratio=1 --disable_data_sync=$dds --write_buffer_size=$wbs --target_file_size_base=$mb --max_write_buffer_number=$wbn --max_background_compactions=$mbc --level0_file_num_compaction_trigger=$ctrig --level0_slowdown_writes_trigger=$delay --level0_stop_writes_trigger=$stop --num_levels=$levels --delete_obsolete_files_period_micros=$del --min_level_to_compress=$mcz --max_grandparent_overlap_factor=$overlap --stats_per_interval=1 --max_bytes_for_level_base=$bpl --use_existing_db=0 --key_id_range=$kir`
      
      Reviewers: andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: lgalanis, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60651
      64046e58
  3. 30 7月, 2016 5 次提交
  4. 29 7月, 2016 2 次提交
    • A
    • A
      Simplify thread-local static initialization · afad5bd1
      Andrew Kryczka 提交于
      Summary:
      The call stack used to look like this during static initialization:
      
        #0  0x00000000008032d1 in rocksdb::ThreadLocalPtr::StaticMeta::StaticMeta() (this=0x7ffff683b300) at util/thread_local.cc:172
        #1  0x00000000008030a7 in rocksdb::ThreadLocalPtr::Instance() () at util/thread_local.cc:135
        #2  0x000000000080310f in rocksdb::ThreadLocalPtr::StaticMeta::Mutex() () at util/thread_local.cc:141
        #3  0x0000000000803103 in rocksdb::ThreadLocalPtr::StaticMeta::InitSingletons() () at util/thread_local.cc:139
        #4  0x000000000080305d in rocksdb::ThreadLocalPtr::InitSingletons() () at util/thread_local.cc:106
      
      It involves outer/inner classes and the call stacks goes
      outer->inner->outer->inner, which is too difficult to understand. We can avoid
      a level of back-and-forth by skipping StaticMeta::InitSingletons(), which
      doesn't initialize anything beyond what ThreadLocalPtr::Instance() already
      initializes.
      
      Now the call stack looks like this during static initialization:
      
        #0  0x00000000008032c5 in rocksdb::ThreadLocalPtr::StaticMeta::StaticMeta() (this=0x7ffff683b300) at util/thread_local.cc:170
        #1  0x00000000008030a7 in rocksdb::ThreadLocalPtr::Instance() () at util/thread_local.cc:135
        #2  0x000000000080305d in rocksdb::ThreadLocalPtr::InitSingletons() () at util/thread_local.cc:106
      
      Test Plan:
      unit tests
      
      verify StaticMeta::mutex_ is still initialized in DefaultEnv() (StaticMeta::mutex_ is the only variable intended to be initialized via StaticMeta::InitSingletons() which I removed)
      
        #0  0x00000000005cee17 in rocksdb::port::Mutex::Mutex(bool) (this=0x7ffff69500b0, adaptive=false) at port/port_posix.cc:52
        #1  0x0000000000769cf8 in rocksdb::ThreadLocalPtr::StaticMeta::StaticMeta() (this=0x7ffff6950000) at util/thread_local.cc:168
        #2  0x0000000000769a53 in rocksdb::ThreadLocalPtr::Instance() () at util/thread_local.cc:133
        #3  0x0000000000769a09 in rocksdb::ThreadLocalPtr::InitSingletons() () at util/thread_local.cc:105
        #4  0x0000000000647d98 in rocksdb::Env::Default() () at util/env_posix.cc:845
      
      Reviewers: lightmark, yhchiang, sdong
      
      Reviewed By: sdong
      
      Subscribers: arahut, IslamAbdelRahman, yiwu, andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60813
      afad5bd1
  5. 28 7月, 2016 6 次提交
    • G
      Remove an extra apostrophe · 6920cde8
      Gunnar Kudrjavets 提交于
      6920cde8
    • A
      add InDomain regression test · e72ea485
      Aaron Gao 提交于
      Summary: regression tests to make sure seek keys not in domain would not fail assertion
      
      Test Plan:
      ```
      [gzh@dev6163.prn2 ~/local/rocksdb] ./prefix_test --gtest_filter=SamePrefixTest.*
      /tmp/rocksdbtest-112628/prefix_test
      Note: Google Test filter = SamePrefixTest.*
      [==========] Running 1 test from 1 test case.
      [----------] Global test environment set-up.
      [----------] 1 test from SamePrefixTest
      [ RUN      ] SamePrefixTest.InDomainTest
      [       OK ] SamePrefixTest.InDomainTest (211 ms)
      [----------] 1 test from SamePrefixTest (211 ms total)
      
      [----------] Global test environment tear-down
      [==========] 1 test from 1 test case ran. (211 ms total)
      ```
      
      Reviewers: andrewkr, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61161
      e72ea485
    • G
      Avoid duplicate task creation for RocksDB contruns · 9c8ac144
      Gunnar Kudrjavets 提交于
      Summary: We rely on a basic evaluation logic: when using an expression `A || B`, the `B` part will only get evaluated when `A` fails. Therefore the task creation tool is guaranteed to run if previous build/test step failed. To indicate the correct return value to shell, the task creation tool will call `exit(1)` which will cause Sandcastle to mark it as a failure.
      
      Test Plan:
      - Land the changes.
      - Trigger a RocksDB contrun - observe the results.
      - Look at the results from the nightly runs and fix issues as necessary.
      
      Current testing so far has been in isolation for various components.
      
      Reviewers: andrewkr, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60909
      9c8ac144
    • S
      db_stress shouldn't assert file size 0 if file creation fails · d4c45428
      sdong 提交于
      Summary: OnTableFileCreated() now is also called when the file creaion fails. In that case, we shouldn't assert the file size is not 0.
      
      Test Plan: Run crash test
      
      Reviewers: yiwu, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: IslamAbdelRahman, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61137
      d4c45428
    • A
      Testing out parallel sandcastle changes · d3bfd339
      Anirban Rahut 提交于
      Summary:
      Removing moreutils from sandcastle and adding gnu parallel.
      Then passing in J= nproc command
      
      Test Plan: Testing on sandcastle
      
      Reviewers: sdong, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61017
      d3bfd339
    • S
      Increse timeout in some tests · 7efd9c25
      sdong 提交于
      Summary: Increase test timeout to some tests to unblock CI.
      
      Test Plan: watch how it runs.
      
      Reviewers: kradhakrishnan, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: IslamAbdelRahman, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61263
      7efd9c25
  6. 27 7月, 2016 9 次提交
  7. 26 7月, 2016 8 次提交
    • A
      Run error-filtering script on diff-triggered tests · 9498069f
      Andrew Kryczka 提交于
      Summary:
      this script creates a summary message based on the test type and
      output. Previously it only ran during contbuild. This diff makes it also
      run on commit-triggered diffs.
      
      Test Plan: will see if it works on diff's sandcastle tests
      
      Reviewers: kradhakrishnan, lightmark, sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D60879
      9498069f
    • I
      Fix Statistics TickersNameMap miss match with Tickers enum · f8061a23
      Islam AbdelRahman 提交于
      Summary:
      TickersNameMap is not consistent with Tickers enum.
      this cause us to report wrong statistics and sometimes to access TickersNameMap outside it's boundary causing crashes (in Fb303 statistics)
      
      Test Plan: added new unit test
      
      Reviewers: sdong, kradhakrishnan
      
      Reviewed By: kradhakrishnan
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61083
      f8061a23
    • I
      Fix MergeContext::copied_operands_ strings moving · 16e225f7
      Islam AbdelRahman 提交于
      Summary:
      MergeContext::copied_operands contain strings that MergeContext::operand_list_ Slices point to
      It's possible that when MergeContext::copied_operands grow, these strings are moved and there place in memory is changed, this will cause MergeContext::operand_list_ to point to invalid memory.
      fix this problem by using unique_ptr<string> instead of string
      
      Test Plan: run tests under mac/clang
      
      Reviewers: sdong, yiwu
      
      Reviewed By: yiwu
      
      Subscribers: andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D61023
      16e225f7
    • K
      Run sandcastle tests in /dev/shm · a4955b39
      krad 提交于
      a4955b39
    • Y
      Fix flaky DBSSTTEST::DeleteObsoleteFilesPendingOutputs · ae0ad719
      Yi Wu 提交于
      Summary: The test is flaky on Travis in osx environment. The background flush the test wanting to block can run behind the L2 manual compaction, making the test actually blocking the L2 compaction and won't able to proceed.
      
      Test Plan: Test run on travis
      
      Reviewers: kradhakrishnan, sdong, andrewkr, IslamAbdelRahman
      
      Reviewed By: IslamAbdelRahman
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61101
      ae0ad719
    • Z
      Update db_bench_tool.cc (#1239) · b2a8016d
      zhang-tong 提交于
      * Update db_bench_tool.cc
      
      * Update db_bench_tool.cc
      b2a8016d
    • Y
      Disable two dynamic options tests under lite build · c6654588
      Yi Wu 提交于
      Summary: RocksDB lite don't support dynamic options. Disable the two test from lite build, and assert `SetOptions` should return `status::OK`.
      
      Test Plan: Run the db_options test under lite build and normal build.
      
      Reviewers: sdong
      
      Reviewed By: sdong
      
      Subscribers: andrewkr, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D61119
      c6654588
    • S
      Ignore stale logs while restarting DBs · 2a6d0cde
      sdong 提交于
      Summary:
      Stale log files can be deleted out of order. This can happen for various reasons. One of the reason is that no data is ever inserted to a column family and we have an optimization to update its log number, but not all the old log files are cleaned up (the case shown in the unit tests added). It can also happen when we simply delete multiple log files out of order.
      
      This causes data corruption because we simply increase seqID after processing the next row and we may end up with writing data with smaller seqID than what is already flushed to memtables.
      
      In DB recovery, for the oldest files we are replaying, if there it contains no data for any column family, we ignore the sequence IDs in the file.
      
      Test Plan: Add two unit tests that fail without the fix.
      
      Reviewers: IslamAbdelRahman, igor, yiwu
      
      Reviewed By: yiwu
      
      Subscribers: hermanlee4, yoshinorim, leveldb, andrewkr, dhruba
      
      Differential Revision: https://reviews.facebook.net/D60891
      2a6d0cde
  8. 24 7月, 2016 1 次提交
  9. 23 7月, 2016 1 次提交