1. 27 5月, 2017 4 次提交
  2. 26 5月, 2017 3 次提交
  3. 25 5月, 2017 7 次提交
  4. 24 5月, 2017 9 次提交
    • 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
    • A
      New API for background work in single thread pool · 6cc9aef1
      Andrew Kryczka 提交于
      Summary:
      Previously users could set `max_background_flushes=0` to force rocksdb to use a single thread pool for both background flushes and compactions. That'll no longer be possible since I'm going to deprecate `max_background_flushes` and `max_background_compactions` in favor of a single option. This diff introduces a new way to force a single thread pool: when high-pri pool has zero threads, all background jobs will be submitted to low-pri pool.
      
      Note the majority of the code change is adding `Env::GetBackgroundThreads()`, which is necessary to check whether the user has provided a zero-sized thread pool.
      Closes https://github.com/facebook/rocksdb/pull/2204
      
      Differential Revision: D4936256
      
      Pulled By: ajkr
      
      fbshipit-source-id: 929a07a0c0705f7766f5339cd013ff74e90d6e01
      6cc9aef1
    • Y
      Fix rocksdb.estimate-num-keys DB property underflow · 9d0a07ed
      Yi Wu 提交于
      Summary:
      rocksdb.estimate-num-keys is compute from `estimate_num_keys - 2 * estimate_num_deletes`. If  `2 * estimate_num_deletes > estimate_num_keys` it will underflow. Fixing it.
      Closes https://github.com/facebook/rocksdb/pull/2348
      
      Differential Revision: D5109272
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: e1bfb91346a59b7282a282b615002507e9d7c246
      9d0a07ed
    • Y
      Simple blob file dumper · 578fb0b1
      Yi Wu 提交于
      Summary:
      A simple blob file dumper.
      Closes https://github.com/facebook/rocksdb/pull/2242
      
      Differential Revision: D5097553
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: c6e00d949fcd3658f9f68da9352f06339fac418d
      578fb0b1
    • A
      Core-local statistics · ac39d6be
      Andrew Kryczka 提交于
      Summary:
      This diff changes `StatisticsImpl` from a thread-local approach to a core-local one. The goal is to perform faster aggregations, particularly for applications that have many threads. There should be no behavior change.
      Closes https://github.com/facebook/rocksdb/pull/2258
      
      Differential Revision: D5016258
      
      Pulled By: ajkr
      
      fbshipit-source-id: 7d4d165b4a91d8110f0409d113d1be91f22d31a9
      ac39d6be
  5. 23 5月, 2017 4 次提交
  6. 21 5月, 2017 1 次提交
  7. 20 5月, 2017 2 次提交
    • Y
      New WriteImpl to pipeline WAL/memtable write · 07bdcb91
      Yi Wu 提交于
      Summary:
      PipelineWriteImpl is an alternative approach to WriteImpl. In WriteImpl, only one thread is allow to write at the same time. This thread will do both WAL and memtable writes for all write threads in the write group. Pending writers wait in queue until the current writer finishes. In the pipeline write approach, two queue is maintained: one WAL writer queue and one memtable writer queue. All writers (regardless of whether they need to write WAL) will still need to first join the WAL writer queue, and after the house keeping work and WAL writing, they will need to join memtable writer queue if needed. The benefit of this approach is that
      1. Writers without memtable writes (e.g. the prepare phase of two phase commit) can exit write thread once WAL write is finish. They don't need to wait for memtable writes in case of group commit.
      2. Pending writers only need to wait for previous WAL writer finish to be able to join the write thread, instead of wait also for previous memtable writes.
      
      Merging #2056 and #2058 into this PR.
      Closes https://github.com/facebook/rocksdb/pull/2286
      
      Differential Revision: D5054606
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: ee5b11efd19d3e39d6b7210937b11cefdd4d1c8d
      07bdcb91
    • Y
      Suppress clang-analyzer false positive · d746aead
      Yi Wu 提交于
      Summary:
      Fixing two types of clang-analyzer false positives:
      * db is deleted and then reopen, and clang-analyzer thinks we are reusing the pointer after it has been deleted. Adding asserts to hint clang-analyzer the pointer is recreated.
      * ParsedInternalKey is (intentionally) uninitialized. Initialize the struct only when clang-analyzer is running.
      Closes https://github.com/facebook/rocksdb/pull/2334
      
      Differential Revision: D5093801
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: f51355382098eb3da5ab9f64e094c6d03e6bdf7d
      d746aead
  8. 19 5月, 2017 2 次提交
  9. 18 5月, 2017 8 次提交