1. 16 7月, 2019 4 次提交
    • J
      Fix memorty leak in `rocksdb_wal_iter_get_batch` function (#5515) · cd252036
      Jim Lin 提交于
      Summary:
      `wal_batch.writeBatchPtr.release()` gives up the ownership of the original `WriteBatch`, but there is no new owner, which causes memory leak.
      
      The patch is simple. Removing `release()` prevent ownership change. `std::move` is for speed.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5515
      
      Differential Revision: D16264281
      
      Pulled By: riversand963
      
      fbshipit-source-id: 51c556b7a1c977325c3aa24acb636303847151fa
      cd252036
    • T
      Fix regression - 100% CPU - Regression for Windows 7 (#5557) · 6e8a1354
      Tomas Kolda 提交于
      Summary:
      Fixes https://github.com/facebook/rocksdb/issues/5552
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5557
      
      Differential Revision: D16266329
      
      fbshipit-source-id: a8f6b50298a6f7c8d6c7e172bb26dd7eb6bd8a4d
      6e8a1354
    • Z
      add more tracing for stats history (#5566) · b0259e45
      Zhongyi Xie 提交于
      Summary:
      Sample info log output from db_bench:
      In-memory:
      ```
      2019/07/12-21:39:19.478490 7fa01b3f5700 [_impl/db_impl.cc:702] ------- PERSISTING STATS -------
      2019/07/12-21:39:19.478633 7fa01b3f5700 [_impl/db_impl.cc:753] Storing 145 stats with timestamp 1562992759 to in-memory stats history
      2019/07/12-21:39:19.478670 7fa01b3f5700 [_impl/db_impl.cc:766] [Pre-GC] In-memory stats history size: 1051218 bytes, slice count: 103
      2019/07/12-21:39:19.478704 7fa01b3f5700 [_impl/db_impl.cc:775] [Post-GC] In-memory stats history size: 1051218 bytes, slice count: 102
      ```
      On-disk:
      ```
      2019/07/12-21:48:53.862548 7f24943f5700 [_impl/db_impl.cc:702] ------- PERSISTING STATS -------
      2019/07/12-21:48:53.862553 7f24943f5700 [_impl/db_impl.cc:709] Reading 145 stats from statistics
      2019/07/12-21:48:53.862852 7f24943f5700 [_impl/db_impl.cc:737] Writing 145 stats with timestamp 1562993333 to persistent stats CF succeeded
      ```
      ```
      2019/07/12-21:48:51.861711 7f24943f5700 [_impl/db_impl.cc:702] ------- PERSISTING STATS -------
      2019/07/12-21:48:51.861729 7f24943f5700 [_impl/db_impl.cc:709] Reading 145 stats from statistics
      2019/07/12-21:48:51.861921 7f24943f5700 [_impl/db_impl.cc:732] Writing to persistent stats CF failed -- Result incomplete: Write stall
      ...
      2019/07/12-21:48:51.873032 7f2494bf6700 [WARN] [lumn_family.cc:749] [default] Stopping writes because we have 2 immutable memtables (waiting for flush), max_write_buffer_number is set to 2
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5566
      
      Differential Revision: D16258187
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 292497099b941418590ed4312411bee36e244dc5
      b0259e45
    • Y
      Cleanup the Arm64 CRC32 unused warning (#5565) · f064d74e
      Yikun Jiang 提交于
      Summary:
      When 'HAVE_ARM64_CRC' is set, the blew methods:
      
      - bool rocksdb::crc32c::isSSE42()
      - bool rocksdb::crc32c::isPCLMULQDQ()
      
      are defined but not used, the unused-function is raised
      when do rocksdb build.
      
      This patch try to cleanup these warnings by add ifndef,
      if it build under the HAVE_ARM64_CRC, we will not define
      `isSSE42` and `isPCLMULQDQ`.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5565
      
      Differential Revision: D16233654
      
      fbshipit-source-id: c32a9dda7465dbf65f9ccafef159124db92cdffd
      f064d74e
  2. 13 7月, 2019 3 次提交
  3. 12 7月, 2019 1 次提交
  4. 11 7月, 2019 1 次提交
  5. 10 7月, 2019 5 次提交
    • G
      Implemented a file logger that uses WritableFileWriter (#5491) · 60d8b198
      ggaurav28 提交于
      Summary:
      Current PosixLogger performs IO operations using posix calls. Thus the
      current implementation will not work for non-posix env. Created a new
      logger class EnvLogger that uses env specific WritableFileWriter for IO operations.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5491
      
      Test Plan: make check
      
      Differential Revision: D15909002
      
      Pulled By: ggaurav28
      
      fbshipit-source-id: 13a8105176e8e42db0c59798d48cb6a0dbccc965
      60d8b198
    • Y
      Improve result print on atomic flush stress test failure (#5549) · f786b4a5
      Yanqin Jin 提交于
      Summary:
      When atomic flush stress test fails, we print internal keys within the range with mismatched key/values for all column families.
      
      Test plan (on devserver)
      Manually hack the code to randomly insert wrong data. Run the test.
      ```
      $make clean && COMPILE_WITH_TSAN=1 make -j32 db_stress
      $./db_stress -test_atomic_flush=true -ops_per_thread=10000
      ```
      Check that proper error messages are printed, as follows:
      ```
      2019/07/08-17:40:14  Starting verification
      Verification failed
      Latest Sequence Number: 190903
      [default] 000000000000050B => 56290000525350515E5F5C5D5A5B5859
      [3] 0000000000000533 => EE100000EAEBE8E9E6E7E4E5E2E3E0E1FEFFFCFDFAFBF8F9
      Internal keys in CF 'default', [000000000000050B, 0000000000000533] (max 8)
        key 000000000000050B seq 139920 type 1
        key 0000000000000533 seq 0 type 1
      Internal keys in CF '3', [000000000000050B, 0000000000000533] (max 8)
        key 0000000000000533 seq 0 type 1
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5549
      
      Differential Revision: D16158709
      
      Pulled By: riversand963
      
      fbshipit-source-id: f07fa87763f87b3bd908da03c956709c6456bcab
      f786b4a5
    • S
      Allow ldb to open DB as secondary (#5537) · aa0367aa
      sdong 提交于
      Summary:
      Right now ldb can open running DB through read-only DB. However, it might leave info logs files to the read-only DB directory. Add an option to open the DB as secondary to avoid it.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5537
      
      Test Plan:
      Run
      ./ldb scan  --max_keys=10 --db=/tmp/rocksdbtest-2491/dbbench --secondary_path=/tmp --no_value --hex
      and
      ./ldb get 0x00000000000000103030303030303030 --hex --db=/tmp/rocksdbtest-2491/dbbench --secondary_path=/tmp
      against a normal db_bench run and observe the output changes. Also observe that no new info logs files are created under /tmp/rocksdbtest-2491/dbbench.
      Run without --secondary_path and observe that new info logs created under /tmp/rocksdbtest-2491/dbbench.
      
      Differential Revision: D16113886
      
      fbshipit-source-id: 4e09dec47c2528f6ca08a9e7a7894ba2d9daebbb
      aa0367aa
    • S
      Fix bugs in DBWALTest.kTolerateCorruptedTailRecords triggered by #5520 (#5550) · cb19e741
      sdong 提交于
      Summary:
      https://github.com/facebook/rocksdb/pull/5520 caused a buffer overflow bug in DBWALTest.kTolerateCorruptedTailRecords. Fix it.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5550
      
      Test Plan: Run the test in UBSAN. It used to fail. Not it succeeds.
      
      Differential Revision: D16165516
      
      fbshipit-source-id: 42c56a6bc64eb091f054b87757fcbef60da825f7
      cb19e741
    • T
      Fix interpreter lines for files with python2-only syntax. · a6a9213a
      Tim Hatch 提交于
      Reviewed By: lisroach
      
      Differential Revision: D15362271
      
      fbshipit-source-id: 48fab12ab6e55a8537b19b4623d2545ca9950ec5
      a6a9213a
  6. 09 7月, 2019 1 次提交
    • S
      db_stress to print some internal keys after verification failure (#5543) · 872a261f
      sdong 提交于
      Summary:
      Print out some more information when db_tress fails with verification failures to help debugging problems.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5543
      
      Test Plan:
      Manually ingest some failures and observe the outputs are like this:
      
      Verification failed
      [default] 0000000000199A5A => 7C3D000078797A7B74757677707172736C6D6E6F68696A6B
      [6] 000000000019C8BD => 65380000616063626D6C6F6E69686B6A
      internal keys in default CF [0000000000199A5A, 000000000019C8BD] (max 8)
        key 0000000000199A5A seq 179246 type 1
        key 000000000019C8BD seq 163970 type 1
      Lastest Sequence Number: 292234
      
      Differential Revision: D16153717
      
      fbshipit-source-id: b33fa50a828c190cbf8249a37955432044f92daf
      872a261f
  7. 08 7月, 2019 3 次提交
    • H
      Fix -Werror=shadow (#5546) · 6ca3feed
      haoyuhuang 提交于
      Summary:
      This PR fixes shadow errors.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5546
      
      Test Plan: make clean && make check -j32 && make clean && USE_CLANG=1 make check -j32 && make clean && COMPILE_WITH_ASAN=1 make check -j32
      
      Differential Revision: D16147841
      
      Pulled By: HaoyuHuang
      
      fbshipit-source-id: 1043500d70c134185f537ab4c3900452752f1534
      6ca3feed
    • Y
      Support GetAllKeyVersions() for non-default cf (#5544) · 7c76a7fb
      Yanqin Jin 提交于
      Summary:
      Previously `GetAllKeyVersions()` supports default column family only. This PR add support for other column families.
      
      Test plan (devserver):
      ```
      $make clean && COMPILE_WITH_ASAN=1 make -j32 db_basic_test
      $./db_basic_test --gtest_filter=DBBasicTest.GetAllKeyVersions
      ```
      All other unit tests must pass.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5544
      
      Differential Revision: D16147551
      
      Pulled By: riversand963
      
      fbshipit-source-id: 5a61aece2a32d789e150226a9b8d53f4a5760168
      7c76a7fb
    • Z
      setup wal_in_db_path_ for secondary instance (#5545) · 8d348069
      Zhongyi Xie 提交于
      Summary:
      PR https://github.com/facebook/rocksdb/pull/5520 adds DBImpl:: wal_in_db_path_ and initializes it in DBImpl::Open, this PR fixes the valgrind error for secondary instance:
      ```
      ==236417== Conditional jump or move depends on uninitialised value(s)
      ==236417==    at 0x62242A: rocksdb::DeleteDBFile(rocksdb::ImmutableDBOptions const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) (file_util.cc:96)
      ==236417==    by 0x512432: rocksdb::DBImpl::DeleteObsoleteFileImpl(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rocksdb::FileType, unsigned long) (db_impl_files.cc:261)
      ==236417==    by 0x515A7A: rocksdb::DBImpl::PurgeObsoleteFiles(rocksdb::JobContext&, bool) (db_impl_files.cc:492)
      ==236417==    by 0x499153: rocksdb::ColumnFamilyHandleImpl::~ColumnFamilyHandleImpl() (column_family.cc:75)
      ==236417==    by 0x499880: rocksdb::ColumnFamilyHandleImpl::~ColumnFamilyHandleImpl() (column_family.cc:84)
      ==236417==    by 0x4C9AF9: rocksdb::DB::DestroyColumnFamilyHandle(rocksdb::ColumnFamilyHandle*) (db_impl.cc:3105)
      ==236417==    by 0x44E853: CloseSecondary (db_secondary_test.cc:53)
      ==236417==    by 0x44E853: rocksdb::DBSecondaryTest::~DBSecondaryTest() (db_secondary_test.cc:31)
      ==236417==    by 0x44EC77: ~DBSecondaryTest_PrimaryDropColumnFamily_Test (db_secondary_test.cc:443)
      ==236417==    by 0x44EC77: rocksdb::DBSecondaryTest_PrimaryDropColumnFamily_Test::~DBSecondaryTest_PrimaryDropColumnFamily_Test() (db_secondary_test.cc:443)
      ==236417==    by 0x83D1D7: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest-all.cc:3824)
      ==236417==    by 0x83D1D7: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest-all.cc:3860)
      ==236417==    by 0x8346DB: testing::TestInfo::Run() [clone .part.486] (gtest-all.cc:4078)
      ==236417==    by 0x8348D4: Run (gtest-all.cc:4047)
      ==236417==    by 0x8348D4: testing::TestCase::Run() [clone .part.487] (gtest-all.cc:4190)
      ==236417==    by 0x834D14: Run (gtest-all.cc:6100)
      ==236417==    by 0x834D14: testing::internal::UnitTestImpl::RunAllTests() (gtest-all.cc:6062)
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5545
      
      Differential Revision: D16146224
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 184c90e451352951da4e955f054d4b1a1f29ea29
      8d348069
  8. 07 7月, 2019 1 次提交
  9. 06 7月, 2019 1 次提交
    • S
      Assert get_context not null in BlockBasedTable::Get() (#5542) · 2de61d91
      sdong 提交于
      Summary:
      clang analyze fails after https://github.com/facebook/rocksdb/pull/5514 for this failure:
      table/block_based/block_based_table_reader.cc:3450:16: warning: Called C++ object pointer is null
                if (!get_context->SaveValue(
                     ^~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      
      The reaon is that a branching is added earlier in the function on get_context is null or not, CLANG analyze thinks that it can be null and we make the function call withou the null checking.
      Fix the issue by removing the branch and add an assert.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5542
      
      Test Plan: "make all check" passes and CLANG analyze failure goes away.
      
      Differential Revision: D16133988
      
      fbshipit-source-id: d4627d03c4746254cc11926c523931086ccebcda
      2de61d91
  10. 05 7月, 2019 1 次提交
  11. 04 7月, 2019 3 次提交
  12. 03 7月, 2019 3 次提交
    • A
      Fix clang build with jemalloc (#5522) · 09ea5d89
      Andrew Kryczka 提交于
      Summary:
      Fixes the below build failure for clang compiler using glibc and jemalloc.
      
      Platform: linux x86-64
      Compiler: clang version 6.0.0-1ubuntu2
      Build failure:
      ```
      $ CXX=clang++ CC=clang USE_CLANG=1 WITH_JEMALLOC_FLAG=1 JEMALLOC=1 EXTRA_LDFLAGS="-L/home/andrew/jemalloc/lib/" EXTRA_CXXFLAGS="-I/home/andrew/jemalloc/include/" make check -j12
      ...
        CC       memory/jemalloc_nodump_allocator.o
      In file included from memory/jemalloc_nodump_allocator.cc:6:
      In file included from ./memory/jemalloc_nodump_allocator.h:11:
      In file included from ./port/jemalloc_helper.h:16:
      /usr/include/clang/6.0.0/include/mm_malloc.h:39:16: error: 'posix_memalign' is missing exception specification 'throw()'
      extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size);
                     ^
      /home/andrew/jemalloc/include/jemalloc/jemalloc.h:388:26: note: expanded from macro 'posix_memalign'
      #  define posix_memalign je_posix_memalign
                               ^
      /home/andrew/jemalloc/include/jemalloc/jemalloc.h:77:29: note: expanded from macro 'je_posix_memalign'
      #  define je_posix_memalign posix_memalign
                                  ^
      /home/andrew/jemalloc/include/jemalloc/jemalloc.h:232:38: note: previous declaration is here
      JEMALLOC_EXPORT int JEMALLOC_NOTHROW    je_posix_memalign(void **memptr,
                                              ^
      /home/andrew/jemalloc/include/jemalloc/jemalloc.h:77:29: note: expanded from macro 'je_posix_memalign'
      #  define je_posix_memalign posix_memalign
                                  ^
      1 error generated.
      Makefile:1972: recipe for target 'memory/jemalloc_nodump_allocator.o' failed
      make: *** [memory/jemalloc_nodump_allocator.o] Error 1
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5522
      
      Differential Revision: D16069869
      
      Pulled By: miasantreble
      
      fbshipit-source-id: c489bbc993adee194b9a550134c6237a264bc443
      09ea5d89
    • A
      Support jemalloc compiled with `--with-jemalloc-prefix` (#5521) · 0d57d93a
      Andrew Kryczka 提交于
      Summary:
      Previously, if the jemalloc was built with nonempty string for
      `--with-jemalloc-prefix`, then `HasJemalloc()` would return false on
      Linux, so jemalloc would not be used at runtime. On Mac, it would cause
      a linker failure due to no definitions found for the weak functions
      declared in "port/jemalloc_helper.h". This should be a rare problem
      because (1) on Linux the default `--with-jemalloc-prefix` value is the
      empty string, and (2) Homebrew's build explicitly sets
      `--with-jemalloc-prefix` to the empty string.
      
      However, there are cases where `--with-jemalloc-prefix` is nonempty.
      For example, when building jemalloc from source on Mac, the default
      setting is `--with-jemalloc-prefix=je_`. Such jemalloc builds should be
      usable by RocksDB.
      
      The fix is simple. Defining `JEMALLOC_MANGLE` before including
      "jemalloc.h" causes it to define unprefixed symbols that are aliases for
      each of the prefixed symbols. Thanks to benesch for figuring this out
      and explaining it to me.
      
      Fixes https://github.com/facebook/rocksdb/issues/1462.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5521
      
      Test Plan:
      build jemalloc with prefixed symbols:
      
      ```
      $ ./configure --with-jemalloc-prefix=lol
      $ make
      ```
      
      compile rocksdb against it:
      
      ```
      $ WITH_JEMALLOC_FLAG=1 JEMALLOC=1 EXTRA_LDFLAGS="-L/home/andrew/jemalloc/lib/" EXTRA_CXXFLAGS="-I/home/andrew/jemalloc/include/" make -j12 ./db_bench
      ```
      
      run db_bench and verify jemalloc actually used:
      
      ```
      $ ./db_bench -benchmarks=fillrandom -statistics=true -dump_malloc_stats=true -stats_dump_period_sec=1
      $ grep jemalloc /tmp/rocksdbtest-1000/dbbench/LOG
      2019/06/29-12:20:52.088658 7fc5fb7f6700 [_impl/db_impl.cc:837] ___ Begin jemalloc statistics ___
      ...
      ```
      
      Differential Revision: D16092758
      
      fbshipit-source-id: c2c358346190ed62ceb2a3547a6c4c180b12f7c4
      0d57d93a
    • Y
      Reduce iterator key comparison for upper/lower bound check (2nd attempt) (#5468) · 662ce620
      Yi Wu 提交于
      Summary:
      This is a second attempt for https://github.com/facebook/rocksdb/issues/5111, with the fix to redo iterate bounds check after `SeekXXX()`. This is because MyRocks may change iterate bounds between seek.
      
      See https://github.com/facebook/rocksdb/issues/5111 for original benchmark result and discussion.
      
      Closes https://github.com/facebook/rocksdb/issues/5463.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5468
      
      Test Plan: Existing rocksdb tests, plus myrocks test `rocksdb.optimizer_loose_index_scans` and `rocksdb.group_min_max`.
      
      Differential Revision: D15863332
      
      fbshipit-source-id: ab4aba5899838591806b8673899bd465f3f53e18
      662ce620
  13. 02 7月, 2019 8 次提交
    • Z
      Exclude StatsHistoryTest.ForceManualFlushStatsCF test from lite mode (#5529) · cfdf2116
      Zhongyi Xie 提交于
      Summary:
      Recent commit 3886dddc introduced a new test which is not compatible with lite mode and breaks contrun test:
      ```
      [ RUN      ] StatsHistoryTest.ForceManualFlushStatsCF
      monitoring/stats_history_test.cc:642: Failure
      Expected: (cfd_stats->GetLogNumber()) < (cfd_test->GetLogNumber()), actual: 15 vs 15
      ```
      This PR excludes the test from lite mode to appease the failing test
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5529
      
      Differential Revision: D16080892
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 2f8a22758f71250cd9f204046404226ddc13b028
      cfdf2116
    • H
      Remove multiple declarations o kMicrosInSecond. · 66464d1f
      haoyuhuang 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/5526
      
      Test Plan:
      OPT=-g V=1 make J=1 unity_test -j32
      make clean && make -j32
      
      Differential Revision: D16079315
      
      Pulled By: HaoyuHuang
      
      fbshipit-source-id: 294ab439cf0db8dd5da44e30eabf0cbb2bb8c4f6
      66464d1f
    • E
      Formatting fixes in db_bench_tool (#5525) · 3e6c1853
      Eli Pozniansky 提交于
      Summary:
      Formatting fixes in db_bench_tool that were accidentally omitted
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5525
      
      Test Plan: Unit tests
      
      Differential Revision: D16078516
      
      Pulled By: elipoz
      
      fbshipit-source-id: bf8df0e3f08092a91794ebf285396d9b8a335bb9
      3e6c1853
    • Y
      Ref and unref cfd before and after calling WaitForFlushMemTables (#5513) · 1e87f2b6
      Yanqin Jin 提交于
      Summary:
      This is to prevent bg flush thread from unrefing and deleting the cfd that has been dropped by a concurrent thread.
      Before RocksDB calls `DBImpl::WaitForFlushMemTables`, we should increase the refcount of each `ColumnFamilyData` so that its ref count will not drop to 0 even if the column family is dropped by another thread. Otherwise the bg flush thread can deref the cfd and deletes it, causing a segfault in `WaitForFlushMemtables` upon accessing `cfd`.
      
      Test plan (on devserver):
      ```
      $make clean && COMPILE_WITH_ASAN=1 make -j32
      $make check
      ```
      All unit tests must pass.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5513
      
      Differential Revision: D16062898
      
      Pulled By: riversand963
      
      fbshipit-source-id: 37dc511f1dc99f036d0201bbd7f0a8f5677c763d
      1e87f2b6
    • E
      Fix from some C-style casting (#5524) · f8720092
      Eli Pozniansky 提交于
      Summary:
      Fix from some C-style casting in bloom.cc and ./tools/db_bench_tool.cc
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5524
      
      Differential Revision: D16075626
      
      Pulled By: elipoz
      
      fbshipit-source-id: 352948885efb64a7ef865942c75c3c727a914207
      f8720092
    • H
      Cache simulator: Refactor the cache simulator so that we can add alternative... · 9f0bd568
      haoyuhuang 提交于
      Cache simulator: Refactor the cache simulator so that we can add alternative policies easily (#5517)
      
      Summary:
      This PR creates cache_simulator.h file. It contains a CacheSimulator that runs against a block cache trace record. We can add alternative cache simulators derived from CacheSimulator later. For example, this PR adds a PrioritizedCacheSimulator that inserts filter/index/uncompressed dictionary blocks with high priority.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5517
      
      Test Plan: make clean && COMPILE_WITH_ASAN=1 make check -j32
      
      Differential Revision: D16043689
      
      Pulled By: HaoyuHuang
      
      fbshipit-source-id: 65f28ed52b866ffb0e6eceffd7f9ca7c45bb680d
      9f0bd568
    • Z
      force flushing stats CF to avoid holding old logs (#5509) · 3886dddc
      Zhongyi Xie 提交于
      Summary:
      WAL records RocksDB writes to all column families. When user flushes a a column family, the old WAL will not accept new writes but cannot be deleted yet because it may still contain live data for other column families. (See https://github.com/facebook/rocksdb/wiki/Write-Ahead-Log#life-cycle-of-a-wal for detailed explanation)
      Because of this, if there is a column family that receive very infrequent writes and no manual flush is called for it, it could prevent a lot of WALs from being deleted. PR https://github.com/facebook/rocksdb/pull/5046 introduced persistent stats column family which is a good example of such column families. Depending on the config, it may have long intervals between writes, and user is unaware of it which makes it difficult to call manual flush for it.
      This PR addresses the problem for persistent stats column family by forcing a flush for persistent stats column family when 1) another column family is flushed 2) persistent stats column family's log number is the smallest among all column families, this way persistent stats column family will  keep advancing its log number when necessary, allowing RocksDB to delete old WAL files.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5509
      
      Differential Revision: D16045896
      
      Pulled By: miasantreble
      
      fbshipit-source-id: 286837b633e988417f0096ff38384742d3b40ef4
      3886dddc
    • Y
      Add secondary instance to stress test (#5479) · c3606757
      Yanqin Jin 提交于
      Summary:
      This PR allows users to run stress tests on secondary instance.
      
      Test plan (on devserver)
      ```
      ./db_stress -ops_per_thread=100000 -enable_secondary=true -threads=32 -secondary_catch_up_one_in=10000 -clear_column_family_one_in=1000 -reopen=100
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5479
      
      Differential Revision: D16074325
      
      Pulled By: riversand963
      
      fbshipit-source-id: c0ed959e7b6c7cda3efd0b3070ab379de3b29f1c
      c3606757
  14. 01 7月, 2019 2 次提交
  15. 29 6月, 2019 1 次提交
  16. 28 6月, 2019 2 次提交