1. 12 12月, 2017 2 次提交
    • Y
      BlobDB: refactor DB open logic · 250a51a3
      Yi Wu 提交于
      Summary:
      Refactor BlobDB open logic. List of changes:
      
      Major:
      * On reopen, mark blob files found as immutable, do not use them for writing new keys.
      * Not to scan the whole file to find file footer. Instead just seek to the end of the file and try to read footer.
      
      Minor:
      * Move most of the real logic from blob_db.cc to blob_db_impl.cc.
      * Not to hold shared_ptr of event listeners in global maps in blob_db.cc
      * Some changes to BlobFile interface.
      * Improve logging and error handling.
      Closes https://github.com/facebook/rocksdb/pull/3246
      
      Differential Revision: D6526147
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 9dc4cdd63359a2f9b696af817086949da8d06952
      250a51a3
    • P
      Fix coverity issues compaction_job, compaction_picker · 6a183d1a
      Prashant D 提交于
      Summary:
      db/compaction_job.cc:
        ReportStartedCompaction(compaction);
      
      CID 1419863 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      2. uninit_member: Non-static class member bottommost_level_ is not initialized in this constructor nor in any functions that it calls.
      
      db/compaction_picker_universal.cc:
      7struct InputFileInfo {
         	2. uninit_member: Non-static class member level is not initialized in this constructor nor in any functions that it calls.
      
      CID 1405355 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      4. uninit_member: Non-static class member index is not initialized in this constructor nor in any functions that it calls.
       38  InputFileInfo() : f(nullptr) {}
      
      db/dbformat.h:
       ParsedInternalKey()
       84      : sequence(kMaxSequenceNumber)  // Make code analyzer happy
      
      CID 1168095 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      2. uninit_member: Non-static class member type is not initialized in this constructor nor in any functions that it calls.
       85  {}  // Intentionally left uninitialized (for speed)
      Closes https://github.com/facebook/rocksdb/pull/3091
      
      Differential Revision: D6534558
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 5ada975956196d267b3f149386842af71eda7553
      6a183d1a
  2. 08 12月, 2017 5 次提交
    • A
      revert fbcode build behavior · e3814a86
      Andrew Kryczka 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3242
      
      Differential Revision: D6514255
      
      Pulled By: ajkr
      
      fbshipit-source-id: c39fa8e745866b052649d02bf339e794d77e96a3
      e3814a86
    • D
      Fix a race condition in WindowsThread (port::Thread) · fe608e32
      Dmitri Smirnov 提交于
      Summary:
      Fix a race condition when we create a thread and immediately destroy
       This case should be supported.
        What happens is that the thread function needs the Data instance
        to actually run but has no shared ownership and must rely on the
        WindowsThread instance to continue existing.
        To address this we change unique_ptr to shared_ptr and then
        acquire an additional refcount for the threadproc which destroys it
        just before the thread exit.
        We choose to allocate shared_ptr instance on the heap as this allows
        the original thread to continue w/o waiting for the new thread to start
        running.
      Closes https://github.com/facebook/rocksdb/pull/3240
      
      Differential Revision: D6511324
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 4633ff7996daf4d287a9fe34f60c1dd28cf4ff36
      fe608e32
    • P
      Fix coverity issues version, write_batch · 34aa245d
      Prashant D 提交于
      Summary:
      db/version_builder.cc:
      117        base_vstorage_->InternalComparator();
      
      CID 1351713 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      2. uninit_member: Non-static class member field level_zero_cmp_.internal_comparator is not initialized in this constructor nor in any functions that it calls.
      
      db/version_edit.h:
      145  FdWithKeyRange()
      146      : fd(),
      147        smallest_key(),
      148        largest_key() {
      
      CID 1418254 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      2. uninit_member: Non-static class member file_metadata is not initialized in this constructor nor in any functions that it calls.
      149  }
      
      db/version_set.cc:
      120    }
      
      CID 1322789 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      4. uninit_member: Non-static class member curr_file_level_ is not initialized in this constructor nor in any functions that it calls.
      121  }
      
      db/write_batch.cc:
       939    assert(cf_mems_);
      
      CID 1419862 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      3. uninit_member: Non-static class member rebuilding_trx_seq_ is not initialized in this constructor nor in any functions that it calls.
       940  }
      Closes https://github.com/facebook/rocksdb/pull/3092
      
      Differential Revision: D6505666
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: fd2c68948a0280772691a419d72ac7e190951d86
      34aa245d
    • P
      table: Fix coverity issues · baff91c1
      Prashant D 提交于
      Summary:
      table/block.cc:
      420  }
      
      CID 1396127 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      7. uninit_member: Non-static class member restart_offset_ is not initialized in this constructor nor in any functions that it calls.
      421}
      
      table/block_based_table_builder.cc:
      
      CID 1418259 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      7. uninit_member: Non-static class member compressed_cache_key_prefix_size is not initialized in this constructor nor in any functions that it calls.
      
      table/block_based_table_reader.h:
         	3. uninit_member: Non-static class member index_type is not initialized in this constructor nor in any functions that it calls.
      
      CID 1396147 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      5. uninit_member: Non-static class member hash_index_allow_collision is not initialized in this constructor nor in any functions that it calls.
      413        global_seqno(kDisableGlobalSequenceNumber) {}
      414
      
      table/cuckoo_table_reader.cc:
       55  if (hash_funs == user_props.end()) {
       56    status_ = Status::Corruption("Number of hash functions not found");
         	5. uninit_member: Non-static class member is_last_level_ is not initialized in this constructor nor in any functions that it calls.
         	7. uninit_member: Non-static class member identity_as_first_hash_ is not initialized in this constructor nor in any functions that it calls.
         	9. uninit_member: Non-static class member use_module_hash_ is not initialized in this constructor nor in any functions that it calls.
         	11. uninit_member: Non-static class member num_hash_func_ is not initialized in this constructor nor in any functions that it calls.
         	13. uninit_member: Non-static class member key_length_ is not initialized in this constructor nor in any functions that it calls.
         	15. uninit_member: Non-static class member user_key_length_ is not initialized in this constructor nor in any functions that it calls.
         	17. uninit_member: Non-static class member value_length_ is not initialized in this constructor nor in any functions that it calls.
         	19. uninit_member: Non-static class member bucket_length_ is not initialized in this constructor nor in any functions that it calls.
         	21. uninit_member: Non-static class member cuckoo_block_size_ is not initialized in this constructor nor in any functions that it calls.
         	23. uninit_member: Non-static class member cuckoo_block_bytes_minus_one_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1322785 (#2 of 2): Uninitialized scalar field (UNINIT_CTOR)
      25. uninit_member: Non-static class member table_size_ is not initialized in this constructor nor in any functions that it calls.
       57    return;
      
      table/plain_table_index.h:
         	2. uninit_member: Non-static class member index_size_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1322801 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      4. uninit_member: Non-static class member sub_index_size_ is not initialized in this constructor nor in any functions that it calls.
      128        huge_page_tlb_size_(huge_page_tlb_size) {}
      129
      Closes https://github.com/facebook/rocksdb/pull/3113
      
      Differential Revision: D6505719
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 38f44d8f9dfefb4c2e25d83b8df25a5201c75618
      baff91c1
    • A
      fix ASAN for DeleteFilesInRange test case · 2e3a0098
      Andrew Kryczka 提交于
      Summary:
      error message was
      
      ```
      ==3095==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7ffd18216c40 at pc 0x0000005edda1 bp 0x7ffd18215550 sp 0x7ffd18214d00
      ...
      Address 0x7ffd18216c40 is located in stack of thread T0 at offset 1952 in frame
           #0 internal_repo_rocksdb/db_compaction_test.cc:1520 rocksdb::DBCompactionTest_DeleteFileRangeFileEndpointsOverlapBug_Test::TestBody()
      ```
      
      It was unsafe to have slices referring to the temporary string objects' buffers, as those strings were destroyed before the slices were used. Fixed it by assigning the strings returned by `Key()` to local variables.
      Closes https://github.com/facebook/rocksdb/pull/3238
      
      Differential Revision: D6507864
      
      Pulled By: ajkr
      
      fbshipit-source-id: dd07de1a0070c6748c1ab4f3d7bd31f9a81889d0
      2e3a0098
  3. 07 12月, 2017 10 次提交
  4. 06 12月, 2017 2 次提交
  5. 04 12月, 2017 1 次提交
  6. 02 12月, 2017 2 次提交
    • A
      gflags in cmake on linux · 57056bb6
      Andrew Kryczka 提交于
      Summary:
      We should use it if available otherwise the tools builds never work. Thanks to #3212, we can set -DGFLAGS=1 and it'll be independent of the namespace with which gflags was compiled.
      Closes https://github.com/facebook/rocksdb/pull/3214
      
      Differential Revision: D6462214
      
      Pulled By: ajkr
      
      fbshipit-source-id: db4e5f1b905322e3119554a9d01b57532c499384
      57056bb6
    • A
      fix gflags namespace · 63f1c0a5
      Andrew Kryczka 提交于
      Summary:
      I started adding gflags support for cmake on linux and got frustrated that I'd need to duplicate the build_detect_platform logic, which determines namespace based on attempting compilation. We can do it differently -- use the GFLAGS_NAMESPACE macro if available, and if not, that indicates it's an old gflags version without configurable namespace so we can simply hardcode "google".
      Closes https://github.com/facebook/rocksdb/pull/3212
      
      Differential Revision: D6456973
      
      Pulled By: ajkr
      
      fbshipit-source-id: 3e6d5bde3ca00d4496a120a7caf4687399f5d656
      63f1c0a5
  7. 01 12月, 2017 4 次提交
    • M
      WritePrepared Txn: PreReleaseCallback · 18dcf7f9
      Maysam Yabandeh 提交于
      Summary:
      Add PreReleaseCallback to be called at the end of WriteImpl but before publishing the sequence number. The callback is used in WritePrepareTxn to i) update the commit map, ii) update the last published sequence number in the 2nd write queue. It also ensures that all the commits will go to the 2nd queue.
      These changes will ensure that the commit map is updated before the sequence number is published and used by reading snapshots. If we use two write queues, the snapshots will use the seq number published by the 2nd queue. If we use one write queue (the default, the snapshots will use the last seq number in the memtable, which also indicates the last published seq number.
      Closes https://github.com/facebook/rocksdb/pull/3205
      
      Differential Revision: D6438959
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: f8b6c434e94bc5f5ab9cb696879d4c23e2577ab9
      18dcf7f9
    • N
      add missing config checks to CMakeLists.txt · 3e40a5e8
      Nikhil Benesch 提交于
      Summary:
      Bring CMakeLists.txt back up to parity with build_detect_platform.
      Closes https://github.com/facebook/rocksdb/pull/3211
      
      Differential Revision: D6452908
      
      Pulled By: ajkr
      
      fbshipit-source-id: 93f5f336ad7eff6ecf65dec47bfaf114dd24cfb2
      3e40a5e8
    • A
      Remove `import` use from TARGETS · fad14050
      Andres Suarez 提交于
      Summary:
      We're moving away from `import`. The equivalent internal construct that
      gets the directory from `fbcode/` is `package_name()`. This is a
      Skylark friendly wrapper around [`get_base_path`].
      
      The additional whitespace change is from running `python ./buckifier/buckify_rocksdb.py`.
      
      [`get_base_path`]: https://buckbuild.com/function/get_base_path.html
      Closes https://github.com/facebook/rocksdb/pull/3210
      
      Reviewed By: yiwu-arbug
      
      Differential Revision: D6451242
      
      Pulled By: zertosh
      
      fbshipit-source-id: 445757261de0ec89d5d332c1ba9af097086326dc
      fad14050
    • Y
      TARGETS file not include tests in opt mode · 54095d33
      Yi Wu 提交于
      Summary:
      Do not build the tests in opt mode, since SyncPoint and other test code will not be included.
      Closes https://github.com/facebook/rocksdb/pull/3204
      
      Differential Revision: D6431154
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: c404ef042c1a6f679e5c1dc57600b3d8cb52fc28
      54095d33
  8. 30 11月, 2017 1 次提交
  9. 29 11月, 2017 13 次提交
    • A
      improve ldb CLI option support · ed3af9ef
      Andrew Kryczka 提交于
      Summary:
      - Made CLI arguments take precedence over options file when both are provided. Note some of the CLI args are not settable via options file, like `--compression_max_dict_bytes`, so it's necessary to allow both ways of providing options simultaneously.
      - Changed `PrepareOptionsForOpenDB` to update the proper `ColumnFamilyOptions` if one exists for the user's `--column_family_name` argument. I supported this only in the base class, `LDBCommand`, so it works for the general arguments. Will defer adding support for subcommand-specific arguments.
      - Made the command fail if `--try_load_options` is provided and loading options file returns NotFound. I found the previous behavior of silently continuing confusing.
      Closes https://github.com/facebook/rocksdb/pull/3144
      
      Differential Revision: D6270544
      
      Pulled By: ajkr
      
      fbshipit-source-id: 7c2eac9f9b38720523d74466fb9e78db53561367
      ed3af9ef
    • A
      convert null terminator in ascii dump · c85f8ccc
      Andrew Kryczka 提交于
      Summary:
      The ASCII output is almost always useless to me as the first '\0' byte in the key or value causes it to stop printing. Since all characters are already surrounded by spaces, "\ 0" (how we display a backslash followed by a zero) and "\0" (how this PR displays a null terminator) are distinguishable. My assumption is the value of seeing all the bytes outweighs the value of the alignment we had before, where we always had one character followed by one space.
      Closes https://github.com/facebook/rocksdb/pull/3203
      
      Differential Revision: D6428651
      
      Pulled By: ajkr
      
      fbshipit-source-id: aafc978a51e9ea029cfe3e763e2bb0e1751b9ccf
      c85f8ccc
    • P
      tools: Fix coverity issues · c1ed005a
      Prashant D 提交于
      Summary:
      tools/ldb_cmd.cc:
      ```
      310  ignore_unknown_options_ = IsFlagPresent(flags, ARG_IGNORE_UNKNOWN_OPTIONS);
      
      CID 1322798 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      5. uninit_member: Non-static class member db_ttl_ is not initialized in this constructor nor in any functions that it calls.
      311}
      ```
      Closes https://github.com/facebook/rocksdb/pull/3122
      
      Differential Revision: D6428576
      
      Pulled By: sagar0
      
      fbshipit-source-id: d77f04dd201f7f1d9f59ef88a215ee7ad7b934e9
      c1ed005a
    • P
      utilities/backupable : Fix coverity issues · 81cf262f
      Prashant D 提交于
      Summary:
      1. Class BackupMeta
      ```
      52      : timestamp_(0), size_(0), meta_filename_(meta_filename),
      
      CID 1168103 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      2. uninit_member: Non-static class member sequence_number_ is not initialized in this constructor nor in any functions that it calls.
      153        file_infos_(file_infos), env_(env) {}
      ```
      2. class BackupEngineImpl
      ```
      513  }
              7. uninit_member: Non-static class member latest_backup_id_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1322803 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      9. uninit_member: Non-static class member latest_valid_backup_id_ is not initialized in this constructor nor in any functions that it calls.
      514}
      ```
      3. struct BackupAfterCopyOrCreateWorkItem
      ```
      368  struct BackupAfterCopyOrCreateWorkItem {
      369    std::future<CopyOrCreateResult> result;
              1. member_decl: Class member declaration for shared.
      370    bool shared;
              3. member_decl: Class member declaration for needed_to_copy.
      371    bool needed_to_copy;
              5. member_decl: Class member declaration for backup_env.
      372    Env* backup_env;
      373    std::string dst_path_tmp;
      374    std::string dst_path;
      375    std::string dst_relative;
              2. uninit_member: Non-static class member shared is not initialized in this constructor nor in any functions that it calls.
              4. uninit_member: Non-static class member needed_to_copy is not initialized in this constructor nor in any functions that it calls.
      
      CID 1396122 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      6. uninit_member: Non-static class member backup_env is not initialized in this constructor nor in any functions that it calls.
      376    BackupAfterCopyOrCreateWorkItem() {}
      ```
      4. struct CopyOrCreateWorkItem
      ```
      318  struct CopyOrCreateWorkItem {
      319    std::string src_path;
      320    std::string dst_path;
      321    std::string contents;
              1. member_decl: Class member declaration for src_env.
      322    Env* src_env;
              3. member_decl: Class member declaration for dst_env.
      323    Env* dst_env;
              5. member_decl: Class member declaration for sync.
      324    bool sync;
              7. member_decl: Class member declaration for rate_limiter.
      325    RateLimiter* rate_limiter;
              9. member_decl: Class member declaration for size_limit.
      326    uint64_t size_limit;
      327    std::promise<CopyOrCreateResult> result;
      328    std::function<void()> progress_callback;
      329
              2. uninit_member: Non-static class member src_env is not initialized in this constructor nor in any functions that it calls.
              4. uninit_member: Non-static class member dst_env is not initialized in this constructor nor in any functions that it calls.
              6. uninit_member: Non-static class member sync is not initialized in this constructor nor in any functions that it calls.
              8. uninit_member: Non-static class member rate_limiter is not initialized in this constructor nor in any functions that it calls.
      
      CID 1396123 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      10. uninit_member: Non-static class member size_limit is not initialized in this constructor nor in any functions that it calls.
      330    CopyOrCreateWorkItem() {}
      ```
      5. struct RestoreAfterCopyOrCreateWorkItem
      ```
      struct RestoreAfterCopyOrCreateWorkItem {
      410    std::future<CopyOrCreateResult> result;
              1. member_decl: Class member declaration for checksum_value.
      411    uint32_t checksum_value;
      
      CID 1396153 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      2. uninit_member: Non-static class member checksum_value is not initialized in this constructor nor in any functions that it calls.
      412    RestoreAfterCopyOrCreateWorkItem() {}
      ```
      Closes https://github.com/facebook/rocksdb/pull/3131
      
      Differential Revision: D6428556
      
      Pulled By: sagar0
      
      fbshipit-source-id: a86675444543eff028e3cae6942197a143a112c4
      81cf262f
    • K
      C API: Add some block based table options · 75d57a5d
      kapitan-k 提交于
      Summary: Closes https://github.com/facebook/rocksdb/pull/3159
      
      Differential Revision: D6428220
      
      Pulled By: sagar0
      
      fbshipit-source-id: 60508d09b5281f54b907a1c40e9631fc08343131
      75d57a5d
    • P
      utilities: Fix coverity issues · b45fbc11
      Prashant D 提交于
      Summary:
      ```
      utilities/persistent_cache/block_cache_tier_file.cc
      64struct CacheRecordHeader {
         	2. uninit_member: Non-static class member magic_ is not initialized in this constructor nor in any functions that it calls.
         	4. uninit_member: Non-static class member crc_ is not initialized in this constructor nor in any functions that it calls.
         	6. uninit_member: Non-static class member key_size_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1396161 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      8. uninit_member: Non-static class member val_size_ is not initialized in this constructor nor in any functions that it calls.
       65  CacheRecordHeader() {}
       66  CacheRecordHeader(const uint32_t magic, const uint32_t key_size,
       67                    const uint32_t val_size)
       68      : magic_(magic), crc_(0), key_size_(key_size), val_size_(val_size) {}
       69
         	1. member_decl: Class member declaration for magic_.
       70  uint32_t magic_;
         	3. member_decl: Class member declaration for crc_.
       71  uint32_t crc_;
         	5. member_decl: Class member declaration for key_size_.
       72  uint32_t key_size_;
         	7. member_decl: Class member declaration for val_size_.
       73  uint32_t val_size_;
       74};
      
      utilities/simulator_cache/sim_cache.cc:
      157        miss_times_(0),
      
      CID 1396124 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      2. uninit_member: Non-static class member stats_ is not initialized in this constructor nor in any functions that it calls.
      158        hit_times_(0) {}
      159
      ```
      Closes https://github.com/facebook/rocksdb/pull/3155
      
      Differential Revision: D6427237
      
      Pulled By: sagar0
      
      fbshipit-source-id: 97e493da5fc043c5b9a3e0d33103442cffb75aad
      b45fbc11
    • P
      utilities: Fix coverity issues in blob_db and col_buf_decoder · 7b57510a
      Prashant D 提交于
      Summary:
      utilities/blob_db/blob_db_impl.cc
      265                    : bdb_options_.blob_dir;
         	3. uninit_member: Non-static class member env_ is not initialized in this constructor nor in any functions that it calls.
         	5. uninit_member: Non-static class member ttl_extractor_ is not initialized in this constructor nor in any functions that it calls.
         	7. uninit_member: Non-static class member open_p1_done_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1418245 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)
      9. uninit_member: Non-static class member debug_level_ is not initialized in this constructor nor in any functions that it calls.
      266}
      
         	4. past_the_end: Function end creates an iterator.
      
      CID 1418258 (#1 of 1): Using invalid iterator (INVALIDATE_ITERATOR)
      5. deref_iterator: Dereferencing iterator file_nums.end() though it is already past the end of its container.
      
      utilities/col_buf_decoder.h:
           nullable_(nullable),
         	2. uninit_member: Non-static class member remain_runs_ is not initialized in this constructor nor in any functions that it calls.
         	4. uninit_member: Non-static class member run_val_ is not initialized in this constructor nor in any functions that it calls.
      
      CID 1396134 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR)
      6. uninit_member: Non-static class member last_val_ is not initialized in this constructor nor in any functions that it calls.
       46        big_endian_(big_endian) {}
      Closes https://github.com/facebook/rocksdb/pull/3134
      
      Differential Revision: D6340607
      
      Pulled By: sagar0
      
      fbshipit-source-id: 25c52566e2ff979fe6c7abb0f40c27fc16597054
      7b57510a
    • T
      CMake cross platform Java support and add JNI to travis · cf0d6aa0
      Tamir Duberstein 提交于
      Summary:
      Rewrite `java/CMakeLists.txt` to take advantage of CMake's cross platform
      Java support.
      
      adamretter
      Closes https://github.com/facebook/rocksdb/pull/2301
      
      Differential Revision: D5070724
      
      Pulled By: sagar0
      
      fbshipit-source-id: 999aee9bd39da2b24a5fe493a2eb0e9af6072dc7
      cf0d6aa0
    • Y
      Blob DB: Add statistics · 78279350
      Yi Wu 提交于
      Summary:
      Adding a list of blob db counters.
      
      Also remove WaStats() which doesn't expose the stats and can be substitute by (BLOB_DB_BYTES_WRITTEN / BLOB_DB_BLOB_FILE_BYTES_WRITTEN).
      Closes https://github.com/facebook/rocksdb/pull/3193
      
      Differential Revision: D6394216
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 017508c8ff3fcd7ea7403c64d0f9834b24816803
      78279350
    • Y
      Fix IOError on WAL write doesn't propagate to write group follower · 3cf562be
      Yi Wu 提交于
      Summary:
      This is a simpler version of #3097 by removing all unrelated changes.
      
      Fixing the bug where concurrent writes may get Status::OK while it actually gets IOError on WAL write. This happens when multiple writes form a write batch group, and the leader get an IOError while writing to WAL. The leader failed to pass the error to followers in the group, and the followers end up returning Status::OK() while actually writing nothing. The bug only affect writes in a batch group. Future writes after the batch group will correctly return immediately with the IOError.
      Closes https://github.com/facebook/rocksdb/pull/3201
      
      Differential Revision: D6421644
      
      Pulled By: yiwu-arbug
      
      fbshipit-source-id: 1c2a455c5b73f6842423785eb8a9dbfbb191dc0e
      3cf562be
    • A
      optimize file ingestion checks for range deletion overlap · 1bdb44de
      Andrew Kryczka 提交于
      Summary:
      Before we were checking every file in the level which was unnecessary. We can piggyback onto the code for checking point-key overlap, which already opens all the files that could possibly contain overlapping range deletions. This PR makes us check just the range deletions from those files, so no extra ones will be opened.
      Closes https://github.com/facebook/rocksdb/pull/3179
      
      Differential Revision: D6358125
      
      Pulled By: ajkr
      
      fbshipit-source-id: 00e200770fdb8f3cc6b1b2da232b755e4ba36279
      1bdb44de
    • J
      Fix minor typo in comment · 022c598a
      Jeffrey Dallatezza 提交于
      Summary:
      mean -> meant
      Closes https://github.com/facebook/rocksdb/pull/3202
      
      Differential Revision: D6426443
      
      Pulled By: sagar0
      
      fbshipit-source-id: adaf07218580ee6903986fa5686de92f43f420e1
      022c598a
    • P
      Support for block_cache num_shards and other config via option string. · 4b65cfc7
      Phani Shekhar Mantripragada 提交于
      Summary:
      Problem: Option string accepts only cache_size as parameter for block_cache which is specified as "block_cache=1M".
      It doesn't accept other parameters like num_shards etc.
      
      Changes :
      1) ParseBlockBasedTableOption in block_based_table_factory is edited to accept cache options in the format "block_cache=<cache_size>:<num_shard_bits>:<strict_capacity_limit>:<high_pri_pool_ratio>".
      Options other than cache_size are optional to maintain backward compatibility. The changes are valid for block_cache_compressed as well.
      For example, "block_cache=1M:6:true:0.5", "block_cache=1M:6:true", "block_cache=1M:6" and "block_cache=1M" are all valid option strings.
      
      2) Corresponding unit tests are added.
      Closes https://github.com/facebook/rocksdb/pull/3108
      
      Differential Revision: D6420997
      
      Pulled By: sagar0
      
      fbshipit-source-id: cdea8b785688d2802907974af27225ccc1c0cd43
      4b65cfc7