1. 06 6月, 2017 1 次提交
  2. 05 6月, 2017 1 次提交
  3. 03 6月, 2017 6 次提交
    • A
      remove test dir before exit when current regression is running · 7e5fac2c
      Aaron Gao 提交于
      Summary:
      clean up the current test dir if the last regression test is still running.
      Closes https://github.com/facebook/rocksdb/pull/2401
      
      Differential Revision: D5177882
      
      Pulled By: lightmark
      
      fbshipit-source-id: 91d899fcc2bde841948eae71af8584d4bdb35468
      7e5fac2c
    • A
      using ThreadLocalPtr to hide ROCKSDB_SUPPORT_THREAD_LOCAL from public… · 7f6c02dd
      Aaron Gao 提交于
      Summary:
      … headers
      
      https://github.com/facebook/rocksdb/pull/2199 should not reference RocksDB-specific macros (like ROCKSDB_SUPPORT_THREAD_LOCAL in this case) to public headers, `iostats_context.h` and `perf_context.h`. We shouldn't do that because users have to provide these compiler flags when building their binary with RocksDB.
      
      We should hide the thread local global variable inside our implementation and just expose a function api to retrieve these variables. It may break some users for now but good for long term.
      
      make check -j64
      Closes https://github.com/facebook/rocksdb/pull/2380
      
      Differential Revision: D5177896
      
      Pulled By: lightmark
      
      fbshipit-source-id: 6fcdfac57f2e2dcfe60992b7385c5403f6dcb390
      7f6c02dd
    • M
      Fix interaction between CompactionFilter::Decision::kRemoveAndSkipUnt… · 138b87ea
      Mike Kolupaev 提交于
      Summary:
      Fixes the following scenario:
       1. Set prefix extractor. Enable bloom filters, with `whole_key_filtering = false`. Use compaction filter that sometimes returns `kRemoveAndSkipUntil`.
       2. Do a compaction.
       3. Compaction creates an iterator with `total_order_seek = false`, calls `SeekToFirst()` on it, then repeatedly calls `Next()`.
       4. At some point compaction filter returns `kRemoveAndSkipUntil`.
       5. Compaction calls `Seek(skip_until)` on the iterator. The key that it seeks to happens to have prefix that doesn't match the bloom filter. Since `total_order_seek = false`, iterator becomes invalid, and compaction thinks that it has reached the end. The rest of the compaction input is silently discarded.
      
      The fix is to make compaction iterator use `total_order_seek = true`.
      
      The implementation for PlainTable is quite awkward. I've made `kRemoveAndSkipUntil` officially incompatible with PlainTable. If you try to use them together, compaction will fail, and DB will enter read-only mode (`bg_error_`). That's not a very graceful way to communicate a misconfiguration, but the alternatives don't seem worth the implementation time and complexity. To be able to check in advance that `kRemoveAndSkipUntil` is not going to be used with PlainTable, we'd need to extend the interface of either `CompactionFilter` or `InternalIterator`. It seems unlikely that anyone will ever want to use `kRemoveAndSkipUntil` with PlainTable: PlainTable probably has very few users, and `kRemoveAndSkipUntil` has only one user so far: us (logdevice).
      Closes https://github.com/facebook/rocksdb/pull/2349
      
      Differential Revision: D5110388
      
      Pulled By: lightmark
      
      fbshipit-source-id: ec29101a99d9dcd97db33923b87f72bce56cc17a
      138b87ea
    • S
      Improve write buffer manager (and allow the size to be tracked in block cache) · 95b0e89b
      Siying Dong 提交于
      Summary:
      Improve write buffer manager in several ways:
      1. Size is tracked when arena block is allocated, rather than every allocation, so that it can better track actual memory usage and the tracking overhead is slightly lower.
      2. We start to trigger memtable flush when 7/8 of the memory cap hits, instead of 100%, and make 100% much harder to hit.
      3. Allow a cache object to be passed into buffer manager and the size allocated by memtable can be costed there. This can help users have one single memory cap across block cache and memtable.
      Closes https://github.com/facebook/rocksdb/pull/2350
      
      Differential Revision: D5110648
      
      Pulled By: siying
      
      fbshipit-source-id: b4238113094bf22574001e446b5d88523ba00017
      95b0e89b
    • A
      Pass CF ID to MemTableRepFactory · a4d9c025
      Andrew Kryczka 提交于
      Summary:
      Some users want to monitor column family activity in their custom memtable implementations. Previously there was no way to figure out with which column family a memtable is associated. This diff:
      
      - adds an overload to MemTableRepFactory::CreateMemTableRep() that provides the CF ID. For compatibility, its default implementation calls the old overload.
      - updates MemTable to create MemTableRep's using the new overload.
      Closes https://github.com/facebook/rocksdb/pull/2346
      
      Differential Revision: D5108061
      
      Pulled By: ajkr
      
      fbshipit-source-id: 3a1921214a348dd8ea0f54e1cab3b71c3d46d616
      a4d9c025
    • Y
      Fix DBWriteTest::ReturnSequenceNumberMultiThreaded data race · f68d88be
      Yi Wu 提交于
      Summary:
      rocksdb::Random is not thread-safe. Have one Random for each thread instead.
      Closes https://github.com/facebook/rocksdb/pull/2400
      
      Differential Revision: D5173919
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 1a99c7b877f3893eb22355af49e321bcad4e53e6
      f68d88be
  4. 02 6月, 2017 8 次提交
  5. 01 6月, 2017 4 次提交
    • T
      db: avoid `#include`ing malloc and jemalloc simultaneously · 0dc3040d
      Tamir Duberstein 提交于
      Summary:
      This fixes a compilation failure on Linux when the system libc is not
      glibc. jemalloc's configure script incorrectly assumes that glibc is
      always used on Linux systems, producing glibc-style signatures; when
      the system libc is e.g. musl, the following error is observed:
      
      ```
        [  0%] Building CXX object CMakeFiles/rocksdb.dir/db/db_impl.cc.o
        In file included from /go/src/github.com/cockroachdb/cockroach/c-deps/rocksdb.src/table/block.h:19:0,
                         from /go/src/github.com/cockroachdb/cockroach/c-deps/rocksdb.src/db/db_impl.cc:77:
        /x-tools/x86_64-unknown-linux-musl/x86_64-unknown-linux-musl/sysroot/usr/include/malloc.h:19:8: error: declaration of 'size_t malloc_usable_size(void*)' has a different exception specifier
         size_t malloc_usable_size(void *);
                ^~~~~~~~~~~~~~~~~~
        In file included from /go/src/github.com/cockroachdb/cockroach/c-deps/rocksdb.src/db/db_impl.cc:20:0:
        /go/native/x86_64-unknown-linux-musl/jemalloc/include/jemalloc/jemalloc.h:78:33: note: from previous declaration 'size_t malloc_usable_size(void*) throw ()'
         #  define je_malloc_usable_size malloc_usable_size
                                         ^
        /go/native/x86_64-unknown-linux-musl/jemalloc/include/jemalloc/jemalloc.h:239:41: note: in expansion of macro 'je_malloc_usable_size'
         JEMALLOC_EXPORT size_t JEMALLOC_NOTHROW je_malloc_usable_size(
                                                 ^~~~~~~~~~~~~~~~~~~~~
        CMakeFiles/rocksdb.dir/build.make:350: recipe for target 'CMakeFiles/rocksdb.dir/db/db_impl.cc.o' failed
      ```
      
      This works around the issue by rearranging the sources such that
      jemalloc's headers are never in the same scope as the system's malloc
      header. The jemalloc issue has been reported as well, see:
      https://github.com/jemalloc/jemalloc/issues/778.
      
      cc tschottdorf
      Closes https://github.com/facebook/rocksdb/pull/2188
      
      Differential Revision: D5163048
      
      Pulled By: siying
      
      fbshipit-source-id: c553125458892def175c1be5682b0330d80b2a0d
      0dc3040d
    • A
      fix regression test · 9b3ed835
      Aaron Gao 提交于
      Summary:
      fix regression test by not reporting stats when building db
      Closes https://github.com/facebook/rocksdb/pull/2390
      
      Differential Revision: D5159909
      
      Pulled By: lightmark
      
      fbshipit-source-id: c3f4b9deb9c6799ff84207fd341c529144f8158d
      9b3ed835
    • A
      Support ingest file when range deletions exist · 9c9909bf
      Andrew Kryczka 提交于
      Summary:
      Previously we returned NotSupported when ingesting files into a database containing any range deletions. This diff adds the support.
      
      - Flush if any memtable contains range deletions overlapping the to-be-ingested file
      - Place to-be-ingested file before any level that contains range deletions overlapping it.
      - Added support for `Version` to return iterators over range deletions in a given level. Previously, we piggybacked getting range deletions onto `Version`'s `Get()` / `AddIterator()` functions by passing them a `RangeDelAggregator*`. But file ingestion needs to get iterators over range deletions, not populate an aggregator (since the aggregator does collapsing and doesn't expose the actual ranges).
      Closes https://github.com/facebook/rocksdb/pull/2370
      
      Differential Revision: D5127648
      
      Pulled By: ajkr
      
      fbshipit-source-id: 816faeb9708adfa5287962bafdde717db56e3f1a
      9c9909bf
    • Y
      Fixing blob db sequence number handling · ad19eb86
      Yi Wu 提交于
      Summary:
      Blob db rely on base db returning sequence number through write batch after DB::Write(). However after recent changes to the write path, DB::Writ()e no longer return sequence number in some cases. Fixing it by have WriteBatchInternal::InsertInto() always encode sequence number into write batch.
      
      Stacking on #2375.
      Closes https://github.com/facebook/rocksdb/pull/2385
      
      Differential Revision: D5148358
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 8bda0aa07b9334ed03ed381548b39d167dc20c33
      ad19eb86
  6. 31 5月, 2017 5 次提交
  7. 27 5月, 2017 7 次提交
  8. 26 5月, 2017 3 次提交
  9. 25 5月, 2017 5 次提交
    • A
      fix column_family_test asan · a99fb992
      Andrew Kryczka 提交于
      Summary:
      stop calling Close() at the end of tests holding a compaction pressure token since it causes the write controller to be deleted while it's still needed. these calls were pointless anyways since Close() is already called in the test's destructor.
      Closes https://github.com/facebook/rocksdb/pull/2367
      
      Differential Revision: D5125906
      
      Pulled By: ajkr
      
      fbshipit-source-id: 6cad8673e5546a82ff602ac0ba59cc3f68dbde46
      a99fb992
    • D
      travis: clang-3.6 -> clang-4.0 · f41bffb3
      Daniel Black 提交于
      Summary:
      just realised when I updated the .travis.yml to trusty the llvm repo was still precise. Update this and clang-4.0.
      Closes https://github.com/facebook/rocksdb/pull/2127
      
      Differential Revision: D4869427
      
      Pulled By: sagar0
      
      fbshipit-source-id: b7f906b6fac28e60cacc6a1f1959d6acf8269906
      f41bffb3
    • A
      update buckifer/TARGETS · e7612798
      Aaron Gao 提交于
      Summary:
      update targets file for release
      Closes https://github.com/facebook/rocksdb/pull/2358
      
      Differential Revision: D5115705
      
      Pulled By: lightmark
      
      fbshipit-source-id: 96a3c7e15b5807b5d0f5a9bb73850b92754b5794
      e7612798
    • A
      Introduce max_background_jobs mutable option · bb01c188
      Andrew Kryczka 提交于
      Summary:
      - `max_background_flushes` and `max_background_compactions` are still supported for backwards compatibility
      - `base_background_compactions` is completely deprecated. Now we just throttle to one background compaction when there's no pressure.
      - `max_background_jobs` is added to automatically partition the concurrent background jobs into flushes vs compactions. Currently it's very simple as we just allocate one-fourth of the jobs to flushes, and the remaining can be used for compactions.
      - The test cases that set `base_background_compactions > 1` needed to be updated. I just grab the pressure token such that the desired number of compactions can be scheduled.
      Closes https://github.com/facebook/rocksdb/pull/2205
      
      Differential Revision: D4937461
      
      Pulled By: ajkr
      
      fbshipit-source-id: df52cbbd497e13bbc9a60560a5ac2a2526b3f1f9
      bb01c188
    • A
      Fix the CMakeLists for RocksJava · 5a253046
      Adam Retter 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/2356
      
      Differential Revision: D5122240
      
      Pulled By: sagar0
      
      fbshipit-source-id: 3764797dd261d5b2a04d58b3967969e66c541bbb
      5a253046