1. 26 9月, 2020 1 次提交
  2. 24 9月, 2020 1 次提交
    • X
      build: make it compile with @mode/win (#7406) · 249f2b59
      Xavier Deguillard 提交于
      Summary:
      While rocksdb can compile on both macOS and Linux with Buck, it couldn't be
      compiled on Windows. The only way to compile it on Windows was with the CMake
      build.
      
      To keep the multi-platform complexity low, I've simply included all the Windows
      bits in the TARGETS file, and added large #if blocks when not on Windows, the
      same was done on the posix specific files.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7406
      
      Test Plan:
      On my devserver:
        buck test //rocksdb/...
      On Windows:
        buck build mode/win //rocksdb/src:rocksdb_lib
      
      Reviewed By: pdillinger
      
      Differential Revision: D23874358
      
      Pulled By: xavierd
      
      fbshipit-source-id: 8768b5d16d7e8f44b5ca1e2483881ca4b24bffbe
      249f2b59
  3. 06 6月, 2020 1 次提交
  4. 30 5月, 2020 1 次提交
    • P
      Allow missing "unversioned" python, as in CentOS 8 (#6883) · 0c56fc4d
      Peter Dillinger 提交于
      Summary:
      RocksDB Makefile was assuming existence of 'python' command,
      which is not present in CentOS 8. We avoid using 'python' if 'python3' is available.
      
      Also added fancy logic to format-diff.sh to make clang-format-diff.py for Python2 work even with Python3 only (as some CentOS 8 FB machines come equipped)
      
      Also, now use just 'python3' for PYTHON if not found so that an informative
      "command not found" error will result rather than something weird.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6883
      
      Test Plan: manually tried some variants, 'make check' on a fresh CentOS 8 machine without 'python' executable or Python2 but with clang-format-diff.py for Python2.
      
      Reviewed By: gg814
      
      Differential Revision: D21767029
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 54761b376b140a3922407bdc462f3572f461d0e9
      0c56fc4d
  5. 21 5月, 2020 1 次提交
  6. 17 5月, 2020 1 次提交
  7. 25 2月, 2020 1 次提交
  8. 14 2月, 2020 1 次提交
  9. 08 2月, 2020 1 次提交
    • C
      Fix Buck build on macOS (#6378) · 25fbdc5a
      Chad Austin 提交于
      Summary:
      liburing is a Linux-specific dependency, so make sure it's configured in the Linux-only Buck rules.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6378
      
      Test Plan:
      ```
      ~/fbcode $ cp internal_repo_rocksdb/repo/TARGETS rocksdb/src
      ~/fbcode $ buck build mode/mac eden
      ```
      
      Reviewed By: chadaustin
      
      Differential Revision: D19760039
      
      Pulled By: riversand963
      
      fbshipit-source-id: 2abfce81c8b17965ef76012262cd117708e0294f
      25fbdc5a
  10. 08 12月, 2019 1 次提交
    • S
      PosixRandomAccessFile::MultiRead() to use I/O uring if supported (#5881) · e3a82bb9
      sdong 提交于
      Summary:
      Right now, PosixRandomAccessFile::MultiRead() executes read requests in parallel. In this PR, it leverages I/O Uring library to run it in parallel, even when page cache is enabled. This function will fall back if the kernel version doesn't support it.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5881
      
      Test Plan: Run the unit test on a kernel version supporting it and make sure all tests pass, and run a unit test on kernel version supporting it and see it pass. Before merging, will also run stress test and see it passes.
      
      Differential Revision: D17742266
      
      fbshipit-source-id: e05699c925ac04fdb42379456a4e23e4ebcb803a
      e3a82bb9
  11. 15 11月, 2019 1 次提交
  12. 14 11月, 2019 1 次提交
    • P
      New Bloom filter implementation for full and partitioned filters (#6007) · f059c7d9
      Peter Dillinger 提交于
      Summary:
      Adds an improved, replacement Bloom filter implementation (FastLocalBloom) for full and partitioned filters in the block-based table. This replacement is faster and more accurate, especially for high bits per key or millions of keys in a single filter.
      
      Speed
      
      The improved speed, at least on recent x86_64, comes from
      * Using fastrange instead of modulo (%)
      * Using our new hash function (XXH3 preview, added in a previous commit), which is much faster for large keys and only *slightly* slower on keys around 12 bytes if hashing the same size many thousands of times in a row.
      * Optimizing the Bloom filter queries with AVX2 SIMD operations. (Added AVX2 to the USE_SSE=1 build.) Careful design was required to support (a) SIMD-optimized queries, (b) compatible non-SIMD code that's simple and efficient, (c) flexible choice of number of probes, and (d) essentially maximized accuracy for a cache-local Bloom filter. Probes are made eight at a time, so any number of probes up to 8 is the same speed, then up to 16, etc.
      * Prefetching cache lines when building the filter. Although this optimization could be applied to the old structure as well, it seems to balance out the small added cost of accumulating 64 bit hashes for adding to the filter rather than 32 bit hashes.
      
      Here's nominal speed data from filter_bench (200MB in filters, about 10k keys each, 10 bits filter data / key, 6 probes, avg key size 24 bytes, includes hashing time) on Skylake DE (relatively low clock speed):
      
      $ ./filter_bench -quick -impl=2 -net_includes_hashing # New Bloom filter
      Build avg ns/key: 47.7135
      Mixed inside/outside queries...
        Single filter net ns/op: 26.2825
        Random filter net ns/op: 150.459
          Average FP rate %: 0.954651
      $ ./filter_bench -quick -impl=0 -net_includes_hashing # Old Bloom filter
      Build avg ns/key: 47.2245
      Mixed inside/outside queries...
        Single filter net ns/op: 63.2978
        Random filter net ns/op: 188.038
          Average FP rate %: 1.13823
      
      Similar build time but dramatically faster query times on hot data (63 ns to 26 ns), and somewhat faster on stale data (188 ns to 150 ns). Performance differences on batched and skewed query loads are between these extremes as expected.
      
      The only other interesting thing about speed is "inside" (query key was added to filter) vs. "outside" (query key was not added to filter) query times. The non-SIMD implementations are substantially slower when most queries are "outside" vs. "inside". This goes against what one might expect or would have observed years ago, as "outside" queries only need about two probes on average, due to short-circuiting, while "inside" always have num_probes (say 6). The problem is probably the nastily unpredictable branch. The SIMD implementation has few branches (very predictable) and has pretty consistent running time regardless of query outcome.
      
      Accuracy
      
      The generally improved accuracy (re: Issue https://github.com/facebook/rocksdb/issues/5857) comes from a better design for probing indices
      within a cache line (re: Issue https://github.com/facebook/rocksdb/issues/4120) and improved accuracy for millions of keys in a single filter from using a 64-bit hash function (XXH3p). Design details in code comments.
      
      Accuracy data (generalizes, except old impl gets worse with millions of keys):
      Memory bits per key: FP rate percent old impl -> FP rate percent new impl
      6: 5.70953 -> 5.69888
      8: 2.45766 -> 2.29709
      10: 1.13977 -> 0.959254
      12: 0.662498 -> 0.411593
      16: 0.353023 -> 0.0873754
      24: 0.261552 -> 0.0060971
      50: 0.225453 -> ~0.00003 (less than 1 in a million queries are FP)
      
      Fixes https://github.com/facebook/rocksdb/issues/5857
      Fixes https://github.com/facebook/rocksdb/issues/4120
      
      Unlike the old implementation, this implementation has a fixed cache line size (64 bytes). At 10 bits per key, the accuracy of this new implementation is very close to the old implementation with 128-byte cache line size. If there's sufficient demand, this implementation could be generalized.
      
      Compatibility
      
      Although old releases would see the new structure as corrupt filter data and read the table as if there's no filter, we've decided only to enable the new Bloom filter with new format_version=5. This provides a smooth path for automatic adoption over time, with an option for early opt-in.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6007
      
      Test Plan: filter_bench has been used thoroughly to validate speed, accuracy, and correctness. Unit tests have been carefully updated to exercise new and old implementations, as well as the logic to select an implementation based on context (format_version).
      
      Differential Revision: D18294749
      
      Pulled By: pdillinger
      
      fbshipit-source-id: d44c9db3696e4d0a17caaec47075b7755c262c5f
      f059c7d9
  13. 06 11月, 2019 1 次提交
  14. 03 8月, 2019 1 次提交
    • Y
      Change buckifier to support parameterized dependencies (#5648) · 30edf187
      Yanqin Jin 提交于
      Summary:
      Users may desire to specify extra dependencies via buck. This PR allows users to pass additional dependencies as a JSON object so that the buckifier script can generate TARGETS file with desired extra dependencies.
      
      Test plan (on dev server)
      ```
      $python buckifier/buckify_rocksdb.py '{"fake": {"extra_deps": [":test_dep", "//fakes/module:mock1"], "extra_compiler_flags": ["-DROCKSDB_LITE", "-Os"]}}'
      Generating TARGETS
      Extra dependencies:
      {'': {'extra_compiler_flags': [], 'extra_deps': []}, 'test_dep1': {'extra_compiler_flags': ['-O2', '-DROCKSDB_LITE'], 'extra_deps': [':fake', '//dep1/mock']}}
      Generated TARGETS Summary:
      - 5 libs
      - 0 binarys
      - 296 tests
      ```
      Verify the TARGETS file.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5648
      
      Differential Revision: D16565043
      
      Pulled By: riversand963
      
      fbshipit-source-id: a6ef02274174fcf159692d7b846e828454d01e89
      30edf187
  15. 31 7月, 2019 1 次提交
    • Y
      Update buckifier templates (#5647) · 55f4f548
      Yanqin Jin 提交于
      Summary:
      Update buckifier templates in the scripts.
      
      Test plan (on devserver)
      ```
      $python buckifier/buckify_rocksdb.py
      ```
      Then
      ```
      $git diff
      ```
      Verify that generated TARGETS file is the same (except for indentation).
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5647
      
      Differential Revision: D16555647
      
      Pulled By: riversand963
      
      fbshipit-source-id: 32574a4d0e820858eab2391304dd731141719bcd
      55f4f548
  16. 04 6月, 2019 1 次提交
    • M
      Add support for loading dynamic libraries into the RocksDB environment (#5281) · c8267120
      Mark Rambacher 提交于
      Summary:
      This change adds a Dynamic Library class to the RocksDB Env.  Dynamic libraries are populated via the  Env::LoadLibrary method.
      
      The addition of dynamic library support allows for a few different features to be developed:
      1.  The compression code can be changed to use dynamic library support.  This would allow RocksDB to determine at run-time what compression packages were installed.  This change would eliminate the need to make sure the build-time and run-time environment had the same library set.  It would also simplify some of the Java build issues (where it attempts to build and include various packages inside the RocksDB jars).
      
      2.  Along with other features (to be provided in a subsequent PR), this change would allow code/configurations to be added to RocksDB at run-time.  For example, the build system includes code for building an "rados" environment and adding "Cassandra" features.  Instead of these extensions being built into the base RocksDB code, these extensions could be loaded at run-time as required/appropriate, either by configuration or explicitly.
      
      We intend to push out other changes in support of the extending RocksDB at run-time via configurations.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5281
      
      Differential Revision: D15447613
      
      Pulled By: riversand963
      
      fbshipit-source-id: 452cd4f54511c0bceee18f6d9d919aae9fd25fef
      c8267120
  17. 19 4月, 2019 1 次提交
  18. 14 2月, 2019 1 次提交
  19. 08 1月, 2019 1 次提交
  20. 04 1月, 2019 1 次提交
  21. 06 12月, 2018 1 次提交
    • A
      Fix buck dev mode fbcode builds (#4747) · e58d7695
      anand76 提交于
      Summary:
      Don't enable ROCKSDB_JEMALLOC unless the build mode is opt and default
      allocator is jemalloc. In dev mode, this is causing compile/link errors such as -
      ```
      stderr: buck-out/dev/gen/rocksdb/src/rocksdb_lib#compile-pic-malloc_stats.cc.o4768b59e,gcc-5-glibc-2.23-clang/db/malloc_stats.cc.o:malloc_stats.cc:function rocksdb::DumpMallocStats(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*): error: undefined reference to 'malloc_stats_print'
      clang-7.0: error: linker command failed with exit code 1
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4747
      
      Differential Revision: D13324840
      
      Pulled By: anand1976
      
      fbshipit-source-id: 45ffbd4f63fe4d9e8a0473d8f066155e4ef64a14
      e58d7695
  22. 03 11月, 2018 1 次提交
    • P
      Change BUCK template files (#4624) · 6c6cb465
      Philip Jameson 提交于
      Summary:
      Slightly changes the format of generated BUCK files for Facebook consumption. Generated targets end up looking like this:
      ```
      cpp_library(
          name = "rocksdb_tools_lib",
          srcs = [
              "tools/db_bench_tool.cc",
              "tools/trace_analyzer_tool.cc",
              "util/testutil.cc",
          ],
          auto_headers = AutoHeaders.RECURSIVE_GLOB,
          arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
          compiler_flags = rocksdb_compiler_flags,
          preprocessor_flags = rocksdb_preprocessor_flags,
          deps = [":rocksdb_lib"],
          external_deps = rocksdb_external_deps,
      )
      ```
      Instead of
      ```
      cpp_library(
          name = "rocksdb_tools_lib",
          srcs = [
              "tools/db_bench_tool.cc",
              "tools/trace_analyzer_tool.cc",
              "util/testutil.cc",
          ],
          headers = AutoHeaders.RECURSIVE_GLOB,
          arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
          compiler_flags = rocksdb_compiler_flags,
          preprocessor_flags = rocksdb_preprocessor_flags,
          deps = [":rocksdb_lib"],
          external_deps = rocksdb_external_deps,
      )
      ```
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/4624
      
      Reviewed By: riversand963
      
      Differential Revision: D12906711
      
      Pulled By: philipjameson
      
      fbshipit-source-id: 32ab64a3390cdcf2c4043ff77517ac1ad58a5e2b
      6c6cb465
  23. 16 10月, 2018 1 次提交
  24. 26 9月, 2018 1 次提交
  25. 29 8月, 2018 1 次提交
    • P
      Grab straggler files to explicitly import AutoHeaders · a876995e
      Philip Jameson 提交于
      Summary: There were a few files that were missed when AutoHeaders were moved to their own file. Add explicit loads
      
      Reviewed By: yfeldblum
      
      Differential Revision: D9499942
      
      fbshipit-source-id: 942bf3a683b8961e1b6244136f6337477dcc45af
      a876995e
  26. 13 7月, 2018 1 次提交
  27. 22 6月, 2018 1 次提交
  28. 31 3月, 2018 1 次提交
  29. 07 3月, 2018 1 次提交
  30. 01 12月, 2017 2 次提交
  31. 16 11月, 2017 1 次提交
  32. 14 8月, 2017 1 次提交
    • A
      rocksdb: make buildable on aarch64 · 5449c099
      Andrew Gallagher 提交于
      Summary:
      - Remove default arch-specified flags.
      - Move non-default arch-specific flags to arch-specific param.
      
      Reviewed By: yiwu-arbug
      
      Differential Revision: D5597499
      
      fbshipit-source-id: c53108ac39c73ac36893d3fd9aaf3b5e3080f1ae
      5449c099
  33. 28 7月, 2017 1 次提交
  34. 25 7月, 2017 1 次提交
  35. 15 7月, 2017 1 次提交
  36. 29 6月, 2017 1 次提交
  37. 28 6月, 2017 1 次提交
  38. 25 5月, 2017 1 次提交
  39. 13 4月, 2017 1 次提交
    • S
      internal_repo_rocksdb to build Java and RocksDB LITE · a22ed4ea
      Siying Dong 提交于
      Summary: Build Java and RocksDB LITE as a customized unit test under internal_repo_rocksdb. One thing I'm not sure is that whether these two tests are triggered in every flavor.
      
      Reviewed By: IslamAbdelRahman
      
      Differential Revision: D4855868
      
      fbshipit-source-id: 82a1628b458744d7692bbd29ef7424cca1294031
      a22ed4ea