rocksdb/utilities/transactions/lock
Yanqin Jin 900f79126d Pass `const LockInfo&` to AcquireLocked() and AcquireWithTimeout (#10874)
Summary:
The motivation and benefit of current behavior of passing `LockInfo&&` as argument to AcquireLocked() and AcquireWithTimeout() is not clear to me. Furthermore, in AcquireWithTimeout(), we access members of `LockInfo&&` after it is passed to AcquireLocked() as rvalue ref. In addition, we may call `AcquireLocked()` with `std::move(lock_info)` multiple times.

This leads to linter warning of use-after-move. If future implementation of AcquireLocked() does something like moving-construct a new `LockedInfo` using the passed-in `LockInfo&&`, then the caller cannot use it because `LockInfo` has a member of type `autovector`.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10874

Test Plan: make check

Reviewed By: ltamasi

Differential Revision: D40704210

Pulled By: riversand963

fbshipit-source-id: 20091df65b4fc63b072bcec9809efc49955d6d35
2022-10-28 14:05:12 -07:00
..
point Pass `const LockInfo&` to AcquireLocked() and AcquireWithTimeout (#10874) 2022-10-28 14:05:12 -07:00
range Run clang-format on utilities/transactions (#10871) 2022-10-25 14:15:22 -07:00
lock_manager.cc Range Locking: Allow different LockManagers, add Range Lock definitions (#7443) 2020-12-07 20:18:07 -08:00
lock_manager.h Range Locking: Allow different LockManagers, add Range Lock definitions (#7443) 2020-12-07 20:18:07 -08:00
lock_tracker.h Range Locking: Allow different LockManagers, add Range Lock definitions (#7443) 2020-12-07 20:18:07 -08:00