1. 21 3月, 2020 4 次提交
    • C
      Get block size only in direct IO mode (#6522) · 5fd152b7
      Cheng Chang 提交于
      Summary:
      When `use_direct_reads` and `use_direct_writes` are `false`, `logical_sector_size_` inside various `*File` implementations are not actually used, so `GetLogicalBlockSize` does not necessarily need to be called for `logical_sector_size_`, just set a default page size.
      
      This is a follow up PR for https://github.com/facebook/rocksdb/pull/6457.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6522
      
      Test Plan: make check
      
      Reviewed By: siying
      
      Differential Revision: D20408885
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: f2d3808f41265237e7fa2c0be9f084f8fa97fe3d
      5fd152b7
    • S
      Change HashMap::Insert()'s value to a const reference (#6567) · 6c50fe1e
      sdong 提交于
      Summary:
      When building RocksDB on VS2015, an error shows up with
      
      hash_map.h(39): error C2719: 'value': formal parameter with requested alignment of 8 won't be aligned
      
      Making the reference a reference can solve the problem, and there isn't a reason we can't do that, at least for the current use of the hash map.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6567
      
      Test Plan: See CI tests pass.
      
      Reviewed By: pdillinger
      
      Differential Revision: D20548543
      
      fbshipit-source-id: 255b55d74cf68a0b324e6f504c56608a97ea6276
      6c50fe1e
    • P
      Exclude more Travis builds for each pull request (#6557) · 66cd07c6
      Peter Dillinger 提交于
      Summary:
      This commit fixes an incorrect version of this change that was previously landed.
      
      On recently adding ARM64 and PPC64LE builds to Travis, we
      seem to have hit some parallel build limits that dramatically increased
      queue times.
      
      This change majorly limits the configurations for ARM64 and PPC64LE to
      build on each pull request, but keeps the large matrix for branch
      builds.
      
      In the process, I changed some previously excluded osx build configurations
      to happen in branch builds.
      
      NB: we might want to move master branch Travis build to daily trigger
      rather than push trigger to further reduce contention.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6557
      
      Test Plan: Travis only
      
      Reviewed By: siying
      
      Differential Revision: D20563425
      
      Pulled By: pdillinger
      
      fbshipit-source-id: d619eb9f196486ed000364aa40de4661f0b1029d
      66cd07c6
    • B
      Make testpilot recognize that these tests have coverage instrumentation · d2e3822d
      Ben Mehne 提交于
      Summary: TestPilot uses two flags to determine whether coverage is already instrumented: `fbcode_macros` and `coverage`.  Normally, these two tags are added automatically to cpp tests, but this is a fake cpp test, so we must manually add them.  The first is easy - `fbcode_macros` is added by the `custom_unittest` library, which is in `fbcode_macros`, so it is appropriate.  The second is harder - we need to verify that we should add the macro.  We do this using the `coverage.bzl` functions.
      
      Reviewed By: siying
      
      Differential Revision: D20549040
      
      fbshipit-source-id: d2732b3ec26f3dff065efdf398abe3241075bb2f
      d2e3822d
  2. 20 3月, 2020 3 次提交
    • P
      Exclude more Travis builds for each pull request (#6557) · 093ff0b2
      Peter Dillinger 提交于
      Summary:
      On recently adding ARM64 and PPC64LE builds to Travis, we
      seem to have hit some parallel build limits that dramatically increased
      queue times.
      
      This change majorly limits the configurations for ARM64 and PPC64LE to
      build on each pull request, but keeps the large matrix for branch
      builds.
      
      In the process, I changed some previously excluded osx build configurations
      to happen in branch builds.
      
      NB: we might want to move master branch Travis build to daily trigger
      rather than push trigger to further reduce contention.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6557
      
      Test Plan: Travis only
      
      Reviewed By: siying
      
      Differential Revision: D20524575
      
      Pulled By: pdillinger
      
      fbshipit-source-id: babcb2c64e195679e472473a1cbdf42de47231ff
      093ff0b2
    • Z
      Added the safe-to-ignore tag to version_edit (#6530) · e10553f2
      Zhichao Cao 提交于
      Summary:
      Each time RocksDB switches to a new MANIFEST file from old one, it calls WriteCurrentStateToManifest() which writes a 'snapshot' of the current in-memory state of versions to the beginning of the new manifest as a bunch of version edits. We can distinguish these version edits from other version edits written during normal operations with a custom, safe-to-ignore tag.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6530
      
      Test Plan: added test to version_edit_test, pass make asan_check
      
      Reviewed By: riversand963
      
      Differential Revision: D20524516
      
      Pulled By: zhichao-cao
      
      fbshipit-source-id: f1de102f5499bfa88dae3caa2f32c7f42cf904db
      e10553f2
    • L
      Clean up VersionBuilder a bit (#6556) · 44240455
      Levi Tamasi 提交于
      Summary:
      The whole point of the pimpl idiom is to hide implementation details.
      Internal helper methods like `CheckConsistency`, `CheckConsistencyForDeletes`,
      and `MaybeAddFile` do not belong in the public interface of the class.
      In addition, the patch switches to `unique_ptr` for the implementation
      object instead of using a raw `delete`.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6556
      
      Test Plan: `make check`
      
      Reviewed By: riversand963
      
      Differential Revision: D20523568
      
      Pulled By: ltamasi
      
      fbshipit-source-id: 5bbb0ccebd0c47a33b815398c7f9cfe13bd775ac
      44240455
  3. 19 3月, 2020 3 次提交
    • L
      Remove GetSortedWalFiles/GetCurrentWalFile from the crash test (#6491) · 217ce200
      Levi Tamasi 提交于
      Summary:
      Currently, `db_stress` tests a randomly picked one of `GetLiveFiles`,
      `GetSortedWalFiles`, and `GetCurrentWalFile` with a 1/N chance when the
      command line parameter `get_live_files_and_wal_files_one_in` is specified.
      The problem is that `GetSortedWalFiles` and `GetCurrentWalFile` are unreliable
      in the sense that they can return errors if another thread removes a WAL file
      while they are executing (which is a perfectly plausible and legitimate scenario).
      The patch splits this command line parameter into three (one for each API),
      and changes the crash test script so that only `GetLiveFiles` is tested during
      our continuous crash test runs.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6491
      
      Test Plan:
      ```
      make check
      python tools/db_crashtest.py whitebox
      ```
      
      Reviewed By: siying
      
      Differential Revision: D20312200
      
      Pulled By: ltamasi
      
      fbshipit-source-id: e7c3481eddfe3bd3d5349476e34abc9eee5b7dc8
      217ce200
    • S
      cmake: add option WITH_CORE_TOOLS to exclude tools except ldb and sst_dump (#6506) · 8ad4b32c
      sdong 提交于
      Summary:
      ldb and sst_dump are most important tools and they don't dependend on gflags. In cmake, we don't have an way to only build these two tools and exclude other tools. This is inconvenient if the environment has a problem with gflags. Add such an option WITH_CORE_TOOLS.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6506
      
      Test Plan: cmake and build with WITH_TOOLS and without.
      
      Differential Revision: D20473029
      
      fbshipit-source-id: 3d730fd14bbae6eeeae7f9cc9aec50a4e488ad72
      8ad4b32c
    • L
      Disable distributed mutex test for valgrind_test (#6553) · 1df9b016
      Levi Tamasi 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6553
      
      Test Plan:
      ```
      $ make valgrind_test -j24
      $ ./folly_synchronization_distributed_mutex_test
      DistributedMutex is not supported in ROCKSDB_LITE, on ARM, or in valgrind_test runs
      ```
      
      Reviewed By: pdillinger
      
      Differential Revision: D20501966
      
      Pulled By: ltamasi
      
      fbshipit-source-id: 386ec5f258f89d0781a36c5b390c665787093a74
      1df9b016
  4. 18 3月, 2020 4 次提交
    • S
      Fix regression bug in partitioned index reseek caused by #6531 (#6551) · 712bc4b6
      sdong 提交于
      Summary:
      https://github.com/facebook/rocksdb/pull/6531 removed some code in partitioned index seek logic. By mistake the logic of storing previous index offset is removed, while the logic of using it is preserved, so that the code might use wrong value to determine reseeking condition.
      This will trigger a bug, if following a Seek() not going to the last block, SeekToLast() is called, and then Seek() is called which should position the cursor to the block before SeekToLast().
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6551
      
      Test Plan: Add a unit test that reproduces the bug. In the same unit test, also some reseek cases are covered to avoid regression.
      
      Reviewed By: pdillinger
      
      Differential Revision: D20493990
      
      fbshipit-source-id: 3919aa4861c0481ec96844e053048da1a934b91d
      712bc4b6
    • A
      Allow table/sst_file_reader_test.cc to use custom Env (#6536) · a8149aef
      akankshamahajan 提交于
      Summary:
      Allowing table/sst_file_reader_test.cc to use custom Env specified by TEST_ENV_URI.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6536
      
      Reviewed By: riversand963
      
      Differential Revision: D20448525
      
      Pulled By: akankshamahajan15
      
      fbshipit-source-id: 74e4d34c8ac4c2743741e78bf599571a4a465459
      a8149aef
    • Y
      Reduce runtime of db_with_timestamp_basic_test (#6546) · 66ed5808
      Yanqin Jin 提交于
      Summary:
      Reduce runtime by reducing test scale to avoid test time-outs.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6546
      
      Test Plan:
      time ./db_with_timestamp_basic_test
      and watch internal tests.
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D20479292
      
      Pulled By: riversand963
      
      fbshipit-source-id: c9e4a155be7699dd4de60fa531de86d442a3ba0a
      66ed5808
    • Y
      Fix compiler warning treated as error (#6547) · 098dce2d
      Yanqin Jin 提交于
      Summary:
      Define a private member variable only in debug mode. Without fix, build will fail
      ```
      In file included from table/block_based/partitioned_index_iterator.cc:9:
      ./table/block_based/partitioned_index_iterator.h:125:32: error: private field 'icomp_' is not used [-Werror,-Wunused-private-field]
        const InternalKeyComparator& icomp_;
      ```
      
      Test plan (dev server)
      1. make check
      2. Make sure fixed in Travis
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6547
      
      Reviewed By: siying
      
      Differential Revision: D20480027
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 288bc94280e240c3136335b6c73eb1ccb0db459d
      098dce2d
  5. 17 3月, 2020 5 次提交
    • P
      Update folly/lang/Align.h (backport to C++11) (#6534) · 6c595f00
      Peter Dillinger 提交于
      Summary:
      For s390x support, some updates in newer version of Align.h are
      needed. Upgrading just that file as best we can, with one addition to
      Portability.h and tweaking new code in Align.h to use C++11 only (no
      non-trivial constexpr functions).
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6534
      
      Test Plan: CI, further work in PR https://github.com/facebook/rocksdb/issues/6168
      
      Differential Revision: D20445942
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 0cef3c367463c71f3123d12cdf287c573af5e342
      6c595f00
    • P
      Remove XXH3(preview) streaming APIs (#6540) · db02664f
      Peter Dillinger 提交于
      Summary:
      There was an alignment bug in our copy of the streaming APIs
      for XXH3 (which we dubbed "XXH3p" for "preview" release). Since those
      APIs are unused and some values for XXH3 have changed since XXH3p, I'm
      simply removing those APIs, expecting it's better to use finalized XXH3
      function if/when we decide to use those APIs (e.g. for checksums).
      
      Fixes https://github.com/facebook/rocksdb/issues/6508
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6540
      
      Test Plan: make check
      
      Differential Revision: D20479271
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 246cf1690d614d3b31042b563d249de32dec1e0d
      db02664f
    • Y
      Use correct Env for DestroyDB in stress test (#6539) · 58918d4c
      Yanqin Jin 提交于
      Summary:
      When using custom Env, trying to call DestroyDB() with default Options will
      fail.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6539
      
      Test Plan: ./db_stress
      
      Differential Revision: D20476204
      
      Pulled By: riversand963
      
      fbshipit-source-id: 612c6754660cc9b5bb3e9c2dbb2f6ecd7f648797
      58918d4c
    • S
      Fix an error in db_bench with gcc 4.8 (#6537) · 488b1e67
      sdong 提交于
      Summary:
      I start to see following failures:
      
      tools/db_bench_tool.cc: In constructor ‘rocksdb::NormalDistribution::NormalDistribution(unsigned int, unsigned int)’:
      tools/db_bench_tool.cc:1528:58: error: declaration of ‘max’ shadows a member of 'this' [-Werror=shadow]
         NormalDistribution(unsigned int min, unsigned int max) :
                                                                ^
      tools/db_bench_tool.cc:1528:58: error: declaration of ‘min’ shadows a member of 'this' [-Werror=shadow]
      tools/db_bench_tool.cc: In constructor ‘rocksdb::UniformDistribution::UniformDistribution(unsigned int, unsigned int)’:
      tools/db_bench_tool.cc:1546:59: error: declaration of ‘max’ shadows a member of 'this' [-Werror=shadow]
         UniformDistribution(unsigned int min, unsigned int max) :
                                                                 ^
      tools/db_bench_tool.cc:1546:59: error: declaration of ‘min’ shadows a member of 'this' [-Werror=shadow]
      
      when I build from GCC 4.8. Rename those variables to fix the problem.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6537
      
      Test Plan: make all with the compiler that used to show the failure.
      
      Differential Revision: D20448741
      
      fbshipit-source-id: 18bcf012dbe020f22f79038a9b08f447befa2574
      488b1e67
    • S
      De-template block based table iterator (#6531) · d6690809
      sdong 提交于
      Summary:
      Right now block based table iterator is used as both of iterating data for block based table, and for the index iterator for partitioend index. This was initially convenient for introducing a new iterator and block type for new index format, while reducing code change. However, these two usage doesn't go with each other very well. For example, Prev() is never called for partitioned index iterator, and some other complexity is maintained in block based iterators, which is not needed for index iterator but maintainers will always need to reason about it. Furthermore, the template usage is not following Google C++ Style which we are following, and makes a large chunk of code tangled together. This commit separate the two iterators. Right now, here is what it is done:
      1. Copy the block based iterator code into partitioned index iterator, and de-template them.
      2. Remove some code not needed for partitioned index. The upper bound check and tricks are removed. We never tested performance for those tricks when partitioned index is enabled in the first place. It's unlikelyl to generate performance regression, as creating new partitioned index block is much rarer than data blocks.
      3. Separate out the prefetch logic to a helper class and both classes call them.
      
      This commit will enable future follow-ups. One direction is that we might separate index iterator interface for data blocks and index blocks, as they are quite different.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6531
      
      Test Plan: build using make and cmake. And build release
      
      Differential Revision: D20473108
      
      fbshipit-source-id: e48011783b339a4257c204cc07507b171b834b0f
      d6690809
  6. 14 3月, 2020 5 次提交
  7. 13 3月, 2020 7 次提交
    • S
      Divide block_based_table_reader.cc (#6527) · 674cf417
      sdong 提交于
      Summary:
      block_based_table_reader.cc is a giant file, which makes it hard for users to navigate the code. Divide the files to multiple files.
      Some class templates cannot be moved to .cc file. They are moved to .h files. It is still better than including them all in block_based_table_reader.cc.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6527
      
      Test Plan: "make all check" and "make release". Also build using cmake.
      
      Differential Revision: D20428455
      
      fbshipit-source-id: ca713c698469f07f35bc0c271358c0874ed4eb28
      674cf417
    • Y
      CI: add Arm support to travis CI matrix (#6436) · dd7a4a8f
      Yuqi Gu 提交于
      Summary:
      This patch based on https://github.com/facebook/rocksdb/issues/5932 offers a better solution to add arm64 to TravisCI matrix.
      Really thank adamretter for initiating Arm CI setup.
      
      Difference comparing to amd64:
      1. For CMake, as no official arm64 release ready on Kitware page,
      a third party (conda-forge) released one is used instead of
      building from source. The main reason is to save CI time.
      2. Explicit export JAVA_HOME on arm64
      3. Disable mingw test
      Signed-off-by: NYuqi Gu <yuqi.gu@arm.com>
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6436
      
      Differential Revision: D20428505
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 81ef02435e41480bb71710b783d85ebf452ce926
      dd7a4a8f
    • B
      Fix coverage for internal_repo_rocksdb · a8851f2d
      Ben Mehne 提交于
      Summary:
      tcc gtest runner need to know the location of the binary in order to collect coverage.  We can give them the location in an environment variable.
      
      Note that all these tests will break in tpx currently, though this is a bug in rocksdb's wrapper script, not tpx.
      
      Reviewed By: siying
      
      Differential Revision: D20430043
      
      fbshipit-source-id: c77d5f70bbc28f6011c6f91906bce2ceecc2f167
      a8851f2d
    • C
      Use DestroyColumnFamilyHandle instead of directly deleting column family handle (#6505) · 2ccb794e
      Cheng Chang 提交于
      Summary:
      Update example usage of closing column family.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6505
      
      Test Plan: cd examples && make column_families_example && ./column_families_example
      
      Differential Revision: D20362100
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: 493c5e0068a40b4f237f8f8511cddd22dc15ea5c
      2ccb794e
    • C
      OpenForReadOnly is not supported in LITE mode (#6523) · 0d2c8e47
      Cheng Chang 提交于
      Summary:
      In DBLogicalBlockSizeCacheTest, do not test OpenForReadOnly in LITE mode.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6523
      
      Test Plan: watch test for LITE mode
      
      Differential Revision: D20420321
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: e45bf6f2800206d6f8ce9af7308e76a08de80643
      0d2c8e47
    • A
      Force Java version on Travis CI (#6512) · 0772768d
      Adam Retter 提交于
      Summary:
      In the `.travis.yml` file the `jdk: openjdk7` element is ignored when `language: cpp`. So whatever version of the JDK that was installed in the Travis container was used - typically JDK 11.
      
      To ensure our RocksJava builds are working, we now instead install and use OpenJDK 8. Ideally we would use OpenJDK 7, as RocksJava supports Java 7, but many of the newer Travis containers don't support Java 7, so Java 8 is the next best thing.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6512
      
      Differential Revision: D20388296
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 8bbe6b59b70cfab7fe81ff63867d907fefdd2df1
      0772768d
    • L
      Move BlobDB related files under db/ to db/blob/ (#6519) · c15e85bd
      Levi Tamasi 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6519
      
      Test Plan:
      ```
      make all
      make check
      ```
      
      Differential Revision: D20400691
      
      Pulled By: ltamasi
      
      fbshipit-source-id: 20ef911cf1c2c92c7f71ef0b493f9be64f2eef94
      c15e85bd
  8. 12 3月, 2020 7 次提交
    • H
      fix MSVC build failures (#6517) · 07a3f7f0
      Huisheng Liu 提交于
      Summary:
      fix a few build warnings that are treated as failures with more strict MSVC warning settings
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6517
      
      Differential Revision: D20401325
      
      Pulled By: pdillinger
      
      fbshipit-source-id: b44979dfaafdc7b3b8cb44a565400a99b331dd30
      07a3f7f0
    • C
      Remove copy of pairs from the for range loop (#6514) · 6dea7530
      Cheng Chang 提交于
      Summary:
      Remove copy of pairs from the for range loop
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6514
      
      Test Plan: make check
      
      Differential Revision: D20389688
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: 1c772091f955be33267514010f3596c61a6f46b5
      6dea7530
    • C
      Cache result of GetLogicalBufferSize in Linux (#6457) · 2d9efc9a
      Cheng Chang 提交于
      Summary:
      In Linux, when reopening DB with many SST files, profiling shows that 100% system cpu time spent for a couple of seconds for `GetLogicalBufferSize`. This slows down MyRocks' recovery time when site is down.
      
      This PR introduces two new APIs:
      1. `Env::RegisterDbPaths` and `Env::UnregisterDbPaths` lets `DB` tell the env when it starts or stops using its database directories . The `PosixFileSystem` takes this opportunity to set up a cache from database directories to the corresponding logical block sizes.
      2. `LogicalBlockSizeCache` is defined only for OS_LINUX to cache the logical block sizes.
      
      Other modifications:
      1. rename `logical buffer size` to `logical block size` to be consistent with Linux terms.
      2. declare `GetLogicalBlockSize` in `PosixHelper` to expose it to `PosixFileSystem`.
      3. change the functions `IOError` and `IOStatus` in `env/io_posix.h` to have external linkage since they are used in other translation units too.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6457
      
      Test Plan:
      1. A new unit test is added for `LogicalBlockSizeCache` in `env/io_posix_test.cc`.
      2. A new integration test is added for `DB` operations related to the cache in `db/db_logical_block_size_cache_test.cc`.
      
      `make check`
      
      Differential Revision: D20131243
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: 3077c50f8065c0bffb544d8f49fb10bba9408d04
      2d9efc9a
    • S
      Include more information in file lock failure (#6507) · 331e6199
      sdong 提交于
      Summary:
      When users fail to open a DB with file lock failure, it is sometimes hard for users to debug. We now include the time the lock is acquired and the thread ID that acquired the lock, to help users debug problems like this. Default Env's thread ID is used.
      
      Since type of lockedFiles is changed, rename it to follow naming convention too.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6507
      
      Test Plan: Add a unit test and improve an existing test to validate the case.
      
      Differential Revision: D20378333
      
      fbshipit-source-id: 312fe0e9733fd1d1e9969c321b90ce523cf4708a
      331e6199
    • L
      Disambiguate CustomFieldTags for the unity build (#6513) · 37a635cf
      Levi Tamasi 提交于
      Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6513
      
      Test Plan: `make unity_test`
      
      Differential Revision: D20388919
      
      Pulled By: ltamasi
      
      fbshipit-source-id: 88dbceab0723a54ee3939e1644e13dc9a4c70420
      37a635cf
    • A
      Add ppc64le builds to Travis (#6144) · 8fc20ac4
      Adam Retter 提交于
      Summary:
      Let's see how this goes...
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6144
      
      Differential Revision: D20387515
      
      Pulled By: pdillinger
      
      fbshipit-source-id: ba2669348c267141dfddff910b4c2224a22cbb38
      8fc20ac4
    • A
      Update to latest Snappy to fix compilation issue on latest MacOS XCode (#6496) · 65b60db9
      Adam Retter 提交于
      Summary:
      * **macOS version:** 10.15.2 (Catalina)
      * **XCode/Clang version:** Apple clang version 11.0.0 (clang-1100.0.33.16)
      
      Before this bugfix the error generated is:
      
      ```
      In file included from ./util/compression.h:23:
      ./snappy-1.1.7/snappy.h:76:59: error: unknown type name 'string'; did you mean 'std::string'?
        size_t Compress(const char* input, size_t input_length, string* output);
                                                                ^~~~~~
                                                                std::string
      /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:211:65: note: 'std::string' declared here
      typedef basic_string<char, char_traits<char>, allocator<char> > string;
                                                                      ^
      In file included from db/builder.cc:10:
      In file included from ./db/builder.h:12:
      In file included from ./db/range_tombstone_fragmenter.h:15:
      In file included from ./db/pinned_iterators_manager.h:12:
      In file included from ./table/internal_iterator.h:13:
      In file included from ./table/format.h:25:
      In file included from ./options/cf_options.h:14:
      In file included from ./util/compression.h:23:
      ./snappy-1.1.7/snappy.h:85:19: error: unknown type name 'string'; did you mean 'std::string'?
                        string* uncompressed);
                        ^~~~~~
                        std::string
      /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:211:65: note: 'std::string' declared here
      typedef basic_string<char, char_traits<char>, allocator<char> > string;
                                                                      ^
      2 errors generated.
      make: *** [jls/db/builder.o] Error 1
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6496
      
      Differential Revision: D20389254
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 2864245c8d0dba7b2ab81294241a62f2adf02e20
      65b60db9
  9. 11 3月, 2020 2 次提交
    • A
      When CMake fails to download a file, display the error message (#6511) · 00c4ab01
      Adam Retter 提交于
      Summary:
      This helps to diagnose errors in the CMake build where it tries to retrieve dependencies.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6511
      
      Differential Revision: D20387392
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 7028dfd62704bcc747f39ff864ea9c9bf51cd1be
      00c4ab01
    • L
      Split BlobFileState into an immutable and a mutable part (#6502) · f5bc3b99
      Levi Tamasi 提交于
      Summary:
      It's never too soon to refactor something. The patch splits the recently
      introduced (`VersionEdit` related) `BlobFileState` into two classes
      `BlobFileAddition` and `BlobFileGarbage`. The idea is that once blob files
      are closed, they are immutable, and the only thing that changes is the
      amount of garbage in them. In the new design, `BlobFileAddition` contains
      the immutable attributes (currently, the count and total size of all blobs, checksum
      method, and checksum value), while `BlobFileGarbage` contains the mutable
      GC-related information elements (count and total size of garbage blobs). This is a
      better fit for the GC logic and is more consistent with how SST files are handled.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6502
      
      Test Plan: `make check`
      
      Differential Revision: D20348352
      
      Pulled By: ltamasi
      
      fbshipit-source-id: ff93f0121e80ab15e0e0a6525ba0d6af16a0e008
      f5bc3b99