1. 22 1月, 2022 1 次提交
  2. 13 1月, 2022 1 次提交
    • Y
      Remove using namespace (#9369) · 0376869f
      Yanqin Jin 提交于
      Summary:
      As title.
      This is part of an fb-internal task.
      First, remove all `using namespace` statements if applicable.
      Next, utilize multiple build platforms and see if anything is broken.
      Should anything become broken, fix the compilation errors with as little extra change as possible.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/9369
      
      Test Plan:
      internal build and make check
      make clean && make static_lib && cd examples && make all
      
      Reviewed By: pdillinger
      
      Differential Revision: D33517260
      
      Pulled By: riversand963
      
      fbshipit-source-id: 3fc4ce6402a073421dfd9a9b2d1c79441dca7a40
      0376869f
  3. 05 1月, 2022 1 次提交
  4. 11 11月, 2021 1 次提交
  5. 03 11月, 2021 1 次提交
  6. 28 10月, 2021 1 次提交
  7. 25 9月, 2021 1 次提交
    • A
      Prevent deadlock in db_stress with DbStressCompactionFilter (#8956) · 791bff5b
      Andrew Kryczka 提交于
      Summary:
      The cyclic dependency was:
      
      - `StressTest::OperateDb()` locks the mutex for key 'k'
      - `StressTest::OperateDb()` calls a function like `PauseBackgroundWork()`, which waits for pending compaction to complete.
      - The pending compaction reaches key `k` and `DbStressCompactionFilter::FilterV2()` calls `Lock()` on that key's mutex, which hangs forever.
      
      The cycle can be broken by using a new function, `port::Mutex::TryLock()`, which returns immediately upon failure to acquire a lock. In that case `DbStressCompactionFilter::FilterV2()` can just decide to keep the key.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8956
      
      Reviewed By: riversand963
      
      Differential Revision: D31183718
      
      Pulled By: ajkr
      
      fbshipit-source-id: 329e4a31ce43085af174cf367ef560b5a04399c5
      791bff5b
  8. 22 9月, 2021 1 次提交
    • M
      Make SystemClock into a Customizable Class (#8636) · 69248698
      mrambacher 提交于
      Summary:
      Made SystemClock into a Customizable class, complete with CreateFromString.
      
      Cleaned up some of the existing SystemClock implementations that were redundant (NoSleep was the same as the internal one for MockEnv).
      
      Changed MockEnv construction to allow Clock to be passed to the Memory/MockFileSystem.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8636
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D30483360
      
      Pulled By: mrambacher
      
      fbshipit-source-id: cd0e3a876c39f8c98fe13374c06e8edbd5b9f2a1
      69248698
  9. 08 9月, 2021 1 次提交
  10. 31 8月, 2021 1 次提交
    • P
      Built-in support for generating unique IDs, bug fix (#8708) · 13ded694
      Peter Dillinger 提交于
      Summary:
      Env::GenerateUniqueId() works fine on Windows and on POSIX
      where /proc/sys/kernel/random/uuid exists. Our other implementation is
      flawed and easily produces collision in a new multi-threaded test.
      As we rely more heavily on DB session ID uniqueness, this becomes a
      serious issue.
      
      This change combines several individually suitable entropy sources
      for reliable generation of random unique IDs, with goal of uniqueness
      and portability, not cryptographic strength nor maximum speed.
      
      Specifically:
      * Moves code for getting UUIDs from the OS to port::GenerateRfcUuid
      rather than in Env implementation details. Callers are now told whether
      the operation fails or succeeds.
      * Adds an internal API GenerateRawUniqueId for generating high-quality
      128-bit unique identifiers, by combining entropy from three "tracks":
        * Lots of info from default Env like time, process id, and hostname.
        * std::random_device
        * port::GenerateRfcUuid (when working)
      * Built-in implementations of Env::GenerateUniqueId() will now always
      produce an RFC 4122 UUID string, either from platform-specific API or
      by converting the output of GenerateRawUniqueId.
      
      DB session IDs now use GenerateRawUniqueId while DB IDs (not as
      critical) try to use port::GenerateRfcUuid but fall back on
      GenerateRawUniqueId with conversion to an RFC 4122 UUID.
      
      GenerateRawUniqueId is declared and defined under env/ rather than util/
      or even port/ because of the Env dependency.
      
      Likely follow-up: enhance GenerateRawUniqueId to be faster after the
      first call and to guarantee uniqueness within the lifetime of a single
      process (imparting the same property onto DB session IDs).
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8708
      
      Test Plan:
      A new mini-stress test in env_test checks the various public
      and internal APIs for uniqueness, including each track of
      GenerateRawUniqueId individually. We can't hope to verify anywhere close
      to 128 bits of entropy, but it can at least detect flaws as bad as the
      old code. Serial execution of the new tests takes about 350 ms on
      my machine.
      
      Reviewed By: zhichao-cao, mrambacher
      
      Differential Revision: D30563780
      
      Pulled By: pdillinger
      
      fbshipit-source-id: de4c9ff4b2f581cf784fcedb5f39f16e5185c364
      13ded694
  11. 25 8月, 2021 1 次提交
    • P
      Add port::GetProcessID() (#8693) · 318fe694
      Peter Dillinger 提交于
      Summary:
      Useful in some places for object uniqueness across processes.
      Currently used for generating a host-wide identifier of Cache objects
      but expected to be used soon in some unique id generation code.
      
      `int64_t` is chosen for return type because POSIX uses signed integer type,
      usually `int`, for `pid_t` and Windows uses `DWORD`, which is `uint32_t`.
      
      Future work: avoid copy-pasted declarations in port_*.h, perhaps with
      port_common.h always included from port.h
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8693
      
      Test Plan: manual for now
      
      Reviewed By: ajkr, anand1976
      
      Differential Revision: D30492876
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 39fc2788623cc9f4787866bdb67a4d183dde7eef
      318fe694
  12. 16 8月, 2021 1 次提交
  13. 29 6月, 2021 1 次提交
  14. 06 5月, 2021 1 次提交
    • S
      Refactor kill point (#8241) · e19908cb
      sdong 提交于
      Summary:
      Refactor kill point to one single class, rather than several extern variables. The intention was to drop unflushed data before killing to simulate some job, and I tried to a pointer to fault ingestion fs to the killing class, but it ended up with harder than I thought. Perhaps we'll need to do this in another way. But I thought the refactoring itself is good so I send it out.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8241
      
      Test Plan: make release and run crash test for a while.
      
      Reviewed By: anand1976
      
      Differential Revision: D28078486
      
      fbshipit-source-id: f9182c1455f52e6851c13f88a21bade63bcec45f
      e19908cb
  15. 27 4月, 2021 1 次提交
    • M
      Fix cast-function-type warning (#8230) · c2c7d5e9
      Mr-Leshiy 提交于
      Summary:
      Fixing cast-function-type which is appears during the following build:
      ```bash
      cmake ..  -DFAIL_ON_WARNINGS=ON -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_SYSTEM_NAME=Windows
      make rocksdb
      ```
      Here is the log:
      ```
      /home/leshiy/Work/rocksdb/port/win/env_win.cc: In constructor ‘rocksdb::port::WinClock::WinClock()’:
      /home/leshiy/Work/rocksdb/port/win/env_win.cc:92:9: error: cast between incompatible function types from ‘FARPROC’ {aka ‘long long int (*)()’} to ‘rocksdb::port::WinClock::FnGetSystemTimePreciseAsFileTime’ {aka ‘void (*)(_FILETIME*)’} [-Werror=cast-function-type]
         92 |         (FnGetSystemTimePreciseAsFileTime)GetProcAddress(
            |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         93 |             module, "GetSystemTimePreciseAsFileTime");
            |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cc1plus: all warnings being treated as errors
      make[2]: *** [CMakeFiles/rocksdb.dir/build.make:4337: CMakeFiles/rocksdb.dir/port/win/env_win.cc.obj] Error 1
      make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/rocksdb.dir/all] Error 2
      make: *** [Makefile:91: all] Error 2
      ```
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8230
      
      Reviewed By: jay-zhuang
      
      Differential Revision: D28000215
      
      Pulled By: mrambacher
      
      fbshipit-source-id: 874782cf48f70470e3fbd9097585bf42e810ca61
      c2c7d5e9
  16. 17 4月, 2021 1 次提交
  17. 25 3月, 2021 1 次提交
  18. 15 3月, 2021 1 次提交
    • M
      Use SystemClock* instead of std::shared_ptr<SystemClock> in lower level routines (#8033) · 3dff28cf
      mrambacher 提交于
      Summary:
      For performance purposes, the lower level routines were changed to use a SystemClock* instead of a std::shared_ptr<SystemClock>.  The shared ptr has some performance degradation on certain hardware classes.
      
      For most of the system, there is no risk of the pointer being deleted/invalid because the shared_ptr will be stored elsewhere.  For example, the ImmutableDBOptions stores the Env which has a std::shared_ptr<SystemClock> in it.  The SystemClock* within the ImmutableDBOptions is essentially a "short cut" to gain access to this constant resource.
      
      There were a few classes (PeriodicWorkScheduler?) where the "short cut" property did not hold.  In those cases, the shared pointer was preserved.
      
      Using db_bench readrandom perf_level=3 on my EC2 box, this change performed as well or better than 6.17:
      
      6.17: readrandom   :      28.046 micros/op 854902 ops/sec;   61.3 MB/s (355999 of 355999 found)
      6.18: readrandom   :      32.615 micros/op 735306 ops/sec;   52.7 MB/s (290999 of 290999 found)
      PR: readrandom   :      27.500 micros/op 871909 ops/sec;   62.5 MB/s (367999 of 367999 found)
      
      (Note that the times for 6.18 are prior to revert of the SystemClock).
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/8033
      
      Reviewed By: pdillinger
      
      Differential Revision: D27014563
      
      Pulled By: mrambacher
      
      fbshipit-source-id: ad0459eba03182e454391b5926bf5cdd45657b67
      3dff28cf
  19. 19 2月, 2021 1 次提交
  20. 29 1月, 2021 1 次提交
    • M
      Remove Legacy and Custom FileWrapper classes from header files (#7851) · 4a09d632
      mrambacher 提交于
      Summary:
      Removed the uses of the Legacy FileWrapper classes from the source code.  The wrappers were creating an additional layer of indirection/wrapping, as the Env already has a FileSystem.
      
      Moved the Custom FileWrapper classes into the CustomEnv, as these classes are really for the private use the the CustomEnv class.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7851
      
      Reviewed By: anand1976
      
      Differential Revision: D26114816
      
      Pulled By: mrambacher
      
      fbshipit-source-id: db32840e58d969d3a0fa6c25aaf13d6dcdc74150
      4a09d632
  21. 26 1月, 2021 1 次提交
    • M
      Add a SystemClock class to capture the time functions of an Env (#7858) · 12f11373
      mrambacher 提交于
      Summary:
      Introduces and uses a SystemClock class to RocksDB.  This class contains the time-related functions of an Env and these functions can be redirected from the Env to the SystemClock.
      
      Many of the places that used an Env (Timer, PerfStepTimer, RepeatableThread, RateLimiter, WriteController) for time-related functions have been changed to use SystemClock instead.  There are likely more places that can be changed, but this is a start to show what can/should be done.  Over time it would be nice to migrate most (if not all) of the uses of the time functions from the Env to the SystemClock.
      
      There are several Env classes that implement these functions.  Most of these have not been converted yet to SystemClock implementations; that will come in a subsequent PR.  It would be good to unify many of the Mock Timer implementations, so that they behave similarly and be tested similarly (some override Sleep, some use a MockSleep, etc).
      
      Additionally, this change will allow new methods to be introduced to the SystemClock (like https://github.com/facebook/rocksdb/issues/7101 WaitFor) in a consistent manner across a smaller number of classes.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7858
      
      Reviewed By: pdillinger
      
      Differential Revision: D26006406
      
      Pulled By: mrambacher
      
      fbshipit-source-id: ed10a8abbdab7ff2e23d69d85bd25b3e7e899e90
      12f11373
  22. 10 1月, 2021 1 次提交
    • A
      Improvements to Env::GetChildren (#7819) · 4926b337
      Adam Retter 提交于
      Summary:
      The main improvement here is to not include `.` or `..` in the results of `Env::GetChildren`. The occurrence of `.` or `..`; it is non-portable, dependent on the Operating System and the File System. See: https://www.gnu.org/software/libc/manual/html_node/Reading_002fClosing-Directory.html
      
      There were lots of duplicate checks spread through the RocksDB codebase previously to skip `.` and `..`. This new removes the need for those at the source.
      
      Also some minor fixes to `Env::GetChildren`:
      * Improve error handling in POSIX implementation
      * Remove unnecessary array allocation on Windows
      * Fix struct name for Windows Non-UTF-8 API
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7819
      
      Reviewed By: ajkr
      
      Differential Revision: D25837394
      
      Pulled By: jay-zhuang
      
      fbshipit-source-id: 1e137e7218d38b450af9c083f73d5357abcbba2e
      4926b337
  23. 07 1月, 2021 1 次提交
    • M
      Create a CustomEnv class; Add WinFileSystem; Make LegacyFileSystemWrapper private (#7703) · e628f59e
      mrambacher 提交于
      Summary:
      This PR does the following:
      -> Creates a WinFileSystem class.  This class is the Windows equivalent of the PosixFileSystem and will be used on Windows systems.
      -> Introduces a CustomEnv class.  A CustomEnv is an Env that takes a FileSystem as constructor argument.  I believe there will only ever be two implementations of this class (PosixEnv and WinEnv).  There is still a CustomEnvWrapper class that takes an Env and a FileSystem and wraps the Env calls with the input Env but uses the FileSystem for the FileSystem calls
      -> Eliminates the public uses of the LegacyFileSystemWrapper.
      
      With this change in place, there are effectively the following patterns of Env:
      - "Base Env classes" (PosixEnv, WinEnv).  These classes implement the core Env functions (e.g. Threads) and have a hard-coded input FileSystem.  These classes inherit from CompositeEnv, implement the core Env functions (threads) and delegate the FileSystem-like calls to the input file system.
      - Wrapped Composite Env classes (MemEnv).  These classes take in an Env and a FileSystem.  The core env functions are re-directed to the wrapped env.  The file system calls are redirected to the input file system
      - Legacy Wrapped Env classes.  These classes take in an Env input (but no FileSystem).  The core env functions are re-directed to the wrapped env.  A "Legacy File System" is created using this env and the file system calls directed to the env itself.
      
      With these changes in place, the PosixEnv becomes a singleton -- there is only ever one created.  Any other use of the PosixEnv is via another wrapped env.  This cleans up some of the issues with the env construction and destruction.
      
      Additionally, there were places in the code that required had an Env when they required a FileSystem.  Many of these places would wrap the Env with a LegacyFileSystemWrapper instead of using the env->GetFileSystem().  These places were changed, thereby removing layers of additional redirection (LegacyFileSystem --> Env --> Env::FileSystem).
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7703
      
      Reviewed By: zhichao-cao
      
      Differential Revision: D25762190
      
      Pulled By: anand1976
      
      fbshipit-source-id: 1a088e97fc916f28ac69c149cd1dcad0ab31704b
      e628f59e
  24. 02 10月, 2020 1 次提交
    • K
      Fix MSVC-related build issues (#7439) · 3e745053
      Koby Kahane 提交于
      Summary:
      This PR addresses some build and functional issues on MSVC targets, as a step towards an eventual goal of having RocksDB build successfully for Windows on ARM64.
      
      Addressed issues include:
      - BitsSetToOne and CountTrailingZeroBits do not compile on non-x64 MSVC targets. A fallback implementation of BitsSetToOne when Intel intrinsics are not available is added, based on the C++20 `<bit>` popcount implementation in Microsoft's STL.
      - The implementation of FloorLog2 for MSVC targets (including x64) gives incorrect results. The unit test easily detects this, but CircleCI is currently configured to only run a specific set of tests for Windows CMake builds, so this seems to have been unnoticed.
      - AsmVolatilePause does not use YieldProcessor on Windows ARM64 targets, even though it is available.
      - When CondVar::TimedWait calls Microsoft STL's condition_variable::wait_for, it can potentially trigger a bug (just recently fixed in the upcoming VS 16.8's STL) that deadlocks various tests that wait for a timer to execute, since `Timer::Run` doesn't get a chance to execute before being blocked by the test function acquiring the mutex.
      - In c_test, `GetTempDir` assumes a POSIX-style temp path.
      - `NormalizePath` did not eliminate consecutive POSIX-style path separators on Windows, resulting in test failures in e.g., wal_manager_test.
      - Various other test failures.
      
      In a followup PR I hope to modify CircleCI's config.yml to invoke all RocksDB unit tests in Windows CMake builds with CTest, instead of the current use of `run_ci_db_test.ps1` which requires individual tests to be specified and is missing many of the existing tests.
      
      Notes from peterd: FloorLog2 is not yet used in production code (it's for something in progress). I also added a few more inexpensive platform-dependent tests to Windows CircleCI runs. And included facebook/folly#1461 as requested
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7439
      
      Reviewed By: jay-zhuang
      
      Differential Revision: D24021563
      
      Pulled By: pdillinger
      
      fbshipit-source-id: 0ec2027c0d6a494d8a0fe38d9667fc2f7e29f7e7
      3e745053
  25. 26 9月, 2020 1 次提交
    • L
      Introduce a helper method UncompressData (#7434) · 30fb9dd5
      Levi Tamasi 提交于
      Summary:
      The patch introduces a helper method in `util/compression.h` called `UncompressData`
      that dispatches calls to the correct uncompression method based on type, and changes
      `UncompressBlockContentsForCompressionType` and `Benchmark::Uncompress` in
      `db_bench` so they are implemented in terms of the new method. This eliminates
      some code duplication. (`Benchmark::Compress` is also updated to use the previously
      introduced `CompressData` helper.)
      
      In addition, the patch brings the implementation of `Snappy_Uncompress` into sync with
      the other uncompression methods by making the method compute the buffer size and allocate
      the buffer itself. Finally, the patch eliminates some potentially risky back-and-forth conversions
      between various unsigned and signed integer types by exposing the size of the allocated buffer
      as a `size_t` instead of an `int`.
      
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/7434
      
      Test Plan:
      `make check`
      `./db_bench -benchmarks=compress,uncompress --compression_type ...`
      
      Reviewed By: riversand963
      
      Differential Revision: D23900011
      
      Pulled By: ltamasi
      
      fbshipit-source-id: b25df63ceec4639889be94acb22eb53e530c54e0
      30fb9dd5
  26. 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
  27. 04 6月, 2020 1 次提交
    • L
      Posix threads (#6865) · 172adce7
      Lucian Petrut 提交于
      Summary:
      Rocksdb is using the c++11 std::threads feature. The issue is that
      MINGW only supports it when using Posix threads.
      
      This change will allow rocksdb::port::WindowsThread to be replaced
      with std::thread, which in turn will allow Rocksdb to be cross
      compiled using MINGW.
      
      At the same time, we'll have to use GetCurrentProcessId instead of _getpid.
      Signed-off-by: NLucian Petrut <lpetrut@cloudbasesolutions.com>
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6865
      
      Reviewed By: cheng-chang
      
      Differential Revision: D21864285
      
      Pulled By: ajkr
      
      fbshipit-source-id: 0982eed313e7d34d351b1364c1ccc722da473205
      172adce7
  28. 18 4月, 2020 1 次提交
    • Y
      Add IsDirectory() to Env and FS (#6711) · 243852ec
      Yanqin Jin 提交于
      Summary:
      IsDirectory() is a common API to check whether a path is a regular file or
      directory.
      POSIX: call stat() and use S_ISDIR(st_mode)
      Windows: PathIsDirectoryA() and PathIsDirectoryW()
      HDFS: FileSystem.IsDirectory()
      Java: File.IsDirectory()
      ...
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6711
      
      Test Plan: make check
      
      Reviewed By: anand1976
      
      Differential Revision: D21053520
      
      Pulled By: riversand963
      
      fbshipit-source-id: 680aadfd8ce982b63689190cf31b3145d5a89e27
      243852ec
  29. 29 3月, 2020 1 次提交
    • C
      Be able to decrease background thread's CPU priority when creating database backup (#6602) · ee50b8d4
      Cheng Chang 提交于
      Summary:
      When creating a database backup, the background threads will not only consume IO resources by copying files, but also consuming CPU such as by computing checksums. During peak times, the CPU consumption by the background threads might affect online queries.
      
      This PR makes it possible to decrease CPU priority of these threads when creating a new backup.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6602
      
      Test Plan: make check
      
      Reviewed By: siying, zhichao-cao
      
      Differential Revision: D20683216
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: 9978b9ed9488e8ce135e90ca083e5b4b7221fd84
      ee50b8d4
  30. 21 3月, 2020 1 次提交
    • C
      Support direct IO in RandomAccessFileReader::MultiRead (#6446) · 4fc21664
      Cheng Chang 提交于
      Summary:
      By supporting direct IO in RandomAccessFileReader::MultiRead, the benefits of parallel IO (IO uring) and direct IO can be combined.
      
      In direct IO mode, read requests are aligned and merged together before being issued to RandomAccessFile::MultiRead, so blocks in the original requests might share the same underlying buffer, the shared buffers are returned in `aligned_bufs`, which is a new parameter of the `MultiRead` API.
      
      For example, suppose alignment requirement for direct IO is 4KB, one request is (offset: 1KB, len: 1KB), another request is (offset: 3KB, len: 1KB), then since they all belong to page (offset: 0, len: 4KB), `MultiRead` only reads the page with direct IO into a buffer on heap, and returns 2 Slices referencing regions in that same buffer. See `random_access_file_reader_test.cc` for more examples.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6446
      
      Test Plan: Added a new test `random_access_file_reader_test.cc`.
      
      Reviewed By: anand1976
      
      Differential Revision: D20097518
      
      Pulled By: cheng-chang
      
      fbshipit-source-id: ca48a8faf9c3af146465c102ef6b266a363e78d1
      4fc21664
  31. 23 2月, 2020 1 次提交
  32. 21 2月, 2020 1 次提交
    • S
      Replace namespace name "rocksdb" with ROCKSDB_NAMESPACE (#6433) · fdf882de
      sdong 提交于
      Summary:
      When dynamically linking two binaries together, different builds of RocksDB from two sources might cause errors. To provide a tool for user to solve the problem, the RocksDB namespace is changed to a flag which can be overridden in build time.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/6433
      
      Test Plan: Build release, all and jtest. Try to build with ROCKSDB_NAMESPACE with another flag.
      
      Differential Revision: D19977691
      
      fbshipit-source-id: aa7f2d0972e1c31d75339ac48478f34f6cfcfb3e
      fdf882de
  33. 08 1月, 2020 1 次提交
  34. 27 11月, 2019 1 次提交
  35. 12 10月, 2019 1 次提交
    • A
      Fix block cache ID uniqueness for Windows builds (#5844) · b00761ee
      Andrew Kryczka 提交于
      Summary:
      Since we do not evict a file's blocks from block cache before that file
      is deleted, we require a file's cache ID prefix is both unique and
      non-reusable. However, the Windows functionality we were relying on only
      guaranteed uniqueness. That meant a newly created file could be assigned
      the same cache ID prefix as a deleted file. If the newly created file
      had block offsets matching the deleted file, full cache keys could be
      exactly the same, resulting in obsolete data blocks returned from cache
      when trying to read from the new file.
      
      We noticed this when running on FAT32 where compaction was writing out
      of order keys due to reading obsolete blocks from its input files. The
      functionality is documented as behaving the same on NTFS, although I
      wasn't able to repro it there.
      Pull Request resolved: https://github.com/facebook/rocksdb/pull/5844
      
      Test Plan:
      we had a reliable repro of out-of-order keys on FAT32 that
      was fixed by this change
      
      Differential Revision: D17752442
      
      fbshipit-source-id: 95d983f9196cf415f269e19293b97341edbf7e00
      b00761ee
  36. 21 9月, 2019 1 次提交
  37. 12 9月, 2019 1 次提交
  38. 16 7月, 2019 1 次提交
  39. 01 6月, 2019 1 次提交
  40. 31 5月, 2019 1 次提交