1. 03 6月, 2017 1 次提交
  2. 02 6月, 2017 8 次提交
  3. 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
  4. 31 5月, 2017 5 次提交
  5. 27 5月, 2017 7 次提交
  6. 26 5月, 2017 3 次提交
  7. 25 5月, 2017 7 次提交
  8. 24 5月, 2017 5 次提交
    • S
      Fix build errors in blob_dump_tool with GCC 4.8 · 02594b5f
      Sagar Vemuri 提交于
      Summary:
      Fixing the build errors seen with GCC 4.8.1.
      ```
      Makefile:105: Warning: Compiling in debug mode. Don't use the resulting binary in production
      utilities/blob_db/blob_dump_tool.cc: In member function ‘rocksdb::Status rocksdb::blob_db::BlobDumpTool::DumpBlobLogFooter(uint64_t, uint64_t*)’:
      utilities/blob_db/blob_dump_tool.cc:149:42: error: expected ‘)’ before ‘PRIu64’
         fprintf(stdout, "  Blob count     : %" PRIu64 "\n", footer.GetBlobCount());
                                                ^
      utilities/blob_db/blob_dump_tool.cc:149:76: error: spurious trailing ‘%’ in format [-Werror=format=]
         fprintf(stdout, "  Blob count     : %" PRIu64 "\n", footer.GetBlobCount());
                                                                                  ^
      utilities/blob_db/blob_dump_tool.cc:149:76: error: too many arguments for format [-Werror=format-extra-args]
      utilities/blob_db/blob_dump_tool.cc: In member function ‘rocksdb::Status rocksdb::blob_db::BlobDumpTool::DumpRecord(rocksdb::blob_db::BlobDumpTool::DisplayType, rocksdb::blob_db::BlobDumpTool::DisplayType, uint64_t*)’:
      utilities/blob_db/blob_dump_tool.cc:161:49: error: expected ‘)’ before ‘PRIx64’
         fprintf(stdout, "Read record with offset 0x%" PRIx64 " (%" PRIu64 "):\n",
                                                       ^
      utilities/blob_db/blob_dump_tool.cc:162:27: error: spurious trailing ‘%’ in format [-Werror=format=]
                 *offset, *offset);
                                 ^
      utilities/blob_db/blob_dump_tool.cc:162:27: error: too many arguments for format [-Werror=format-extra-args]
      utilities/blob_db/blob_dump_tool.cc:176:38: error: expected ‘)’ before ‘PRIu64’
         fprintf(stdout, "  blob size  : %" PRIu64 "\n", record.GetBlobSize());
                                            ^
      utilities/blob_db/blob_dump_tool.cc:176:71: error: spurious trailing ‘%’ in format [-Werror=format=]
         fprintf(stdout, "  blob size  : %" PRIu64 "\n", record.GetBlobSize());
                                                                             ^
      utilities/blob_db/blob_dump_tool.cc:176:71: error: too many arguments for format [-Werror=format-extra-args]
      utilities/blob_db/blob_dump_tool.cc:178:38: error: expected ‘)’ before ‘PRIu64’
         fprintf(stdout, "  time       : %" PRIu64 "\n", record.GetTimeVal());
                                            ^
      utilities/blob_db/blob_dump_tool.cc:178:70: error: spurious trailing ‘%’ in format [-Werror=format=]
         fprintf(stdout, "  time       : %" PRIu64 "\n", record.GetTimeVal());
                                                                            ^
      utilities/blob_db/blob_dump_tool.cc:178:70: error: too many arguments for format [-Werror=format-extra-args]
      utilities/blob_db/blob_dump_tool.cc:214:38: error: expected ‘)’ before ‘PRIu64’
         fprintf(stdout, "  sequence   : %" PRIu64 "\n", record.GetSN());
                                            ^
      utilities/blob_db/blob_dump_tool.cc:214:65: error: spurious trailing ‘%’ in format [-Werror=format=]
         fprintf(stdout, "  sequence   : %" PRIu64 "\n", record.GetSN());
      ```
      Closes https://github.com/facebook/rocksdb/pull/2359
      
      Differential Revision: D5117684
      
      Pulled By: sagar0
      
      fbshipit-source-id: 7480346bcd96205fcae890927c5e68cf004e87be
      02594b5f
    • I
      Fix column family seconds_up accounting · 52d9e5f7
      Igor Canadi 提交于
      Summary:
      `cf_stats_snapshot_.seconds_up` appears to be never updated, unlike `db_stats_snapshot_.seconds_up`, which is updated here: https://github.com/facebook/rocksdb/blob/master/db/internal_stats.cc#L883
      
      This leads to wrong information in the log, for example:
      ```
      ** Compaction Stats [default] **
      
      ....
      
      Uptime(secs): 85591.2 total, 85591.2 interval
      ```
      
      Even though DB's interval is correctly logged as 60 seconds:
      ```
      ** DB Stats **
      Uptime(secs): 85591.2 total, 637.8 interval
      ```
      Closes https://github.com/facebook/rocksdb/pull/2338
      
      Differential Revision: D5114131
      
      Pulled By: sagar0
      
      fbshipit-source-id: 85243a38213236ccbb601a7f7aaa8865eaa8083c
      52d9e5f7
    • S
      Fix errors in clang-analyzer builds · 7d8207f1
      Sagar Vemuri 提交于
      Summary:
      Fix build error in db_iter.cc when running clang-analyzer.
      ```
        CC       db/db_iter.o
      db/db_iter.cc:938:21: error: no matching constructor for initialization of 'rocksdb::ParsedInternalKey'
        ParsedInternalKey ikey(Slice(), 0, 0);
                          ^    ~~~~~~~~~~~~~
      ./db/dbformat.h:84:3: note: candidate constructor not viable: no known conversion from 'int' to 'rocksdb::ValueType' for 3rd argument
        ParsedInternalKey(const Slice& u, const SequenceNumber& seq, ValueType t)
        ^
      ./db/dbformat.h:78:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided
      struct ParsedInternalKey {
             ^
      ./db/dbformat.h:78:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided
      ./db/dbformat.h:83:3: note: candidate constructor not viable: requires 0 arguments, but 3 were provided
        ParsedInternalKey() { }  // Intentionally left uninitialized (for speed)
        ^
      1 error generated.
      ```
      Closes https://github.com/facebook/rocksdb/pull/2354
      
      Differential Revision: D5115751
      
      Pulled By: sagar0
      
      fbshipit-source-id: b0e386d4e935e4725b07761c3ca5f7a8cbde3692
      7d8207f1
    • S
      Fix release build on Linux · 85b8569a
      Sagar Vemuri 提交于
      Summary:
      Release builds are failing on Linux with the error:
      ```
      tools/db_stress.cc: In function ‘int main(int, char**)’:
      tools/db_stress.cc:2365:12: error: ‘rocksdb::SyncPoint’ has not been declared
         rocksdb::SyncPoint::GetInstance()->SetCallBack(
                  ^
      tools/db_stress.cc:2370:12: error: ‘rocksdb::SyncPoint’ has not been declared
         rocksdb::SyncPoint::GetInstance()->SetCallBack(
                  ^
      tools/db_stress.cc:2375:12: error: ‘rocksdb::SyncPoint’ has not been declared
         rocksdb::SyncPoint::GetInstance()->EnableProcessing();
                  ^
      make[1]: *** [tools/db_stress.o] Error 1
      make[1]: Leaving directory `/data/sandcastle/boxes/trunk-git-rocksdb-public'
      make: *** [release] Error 2
      ```
      Closes https://github.com/facebook/rocksdb/pull/2355
      
      Differential Revision: D5113552
      
      Pulled By: sagar0
      
      fbshipit-source-id: 351df707277787da5633ba4a40e52edc7c895dc4
      85b8569a
    • G
      Allow SstFileWriter to use the rate limiter · 69ec8356
      Giuseppe Ottaviano 提交于
      Summary:
      The default IO priority of WritableFiles is IO_TOTAL, meaning that
      they will bypass the rate limiter if it's passed in the options.
      
      This change allows to pass an io priority in construction, so that by
      setting IO_LOW or IO_HIGH the rate limit will be honored.
      
      It also fixes a minor bug: SstFileWriter's copy and move constructor
      are not disabled and incorrect, as any copy/move will result in a
      double free. Switching to unique_ptr makes the object correctly
      movable and non-copyable as expected.
      
      Also fix minor style inconsistencies.
      Closes https://github.com/facebook/rocksdb/pull/2335
      
      Differential Revision: D5113260
      
      Pulled By: sagar0
      
      fbshipit-source-id: e084236e7ff0b50a56cbeceaa9fedd5e210bf9f8
      69ec8356