Fix ignoring params in default impl of GetForUpdate (#4679)
Summary: The default implementation of GetForUpdate that receives PinnableSlice was mistakenly dropping column_family and exclusive parameters. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4679 Differential Revision: D13062531 Pulled By: maysamyabandeh fbshipit-source-id: 7625d0c1ba872a5d894b58ced42147d6c8556a6f
This commit is contained in:
parent
0ed738fdd0
commit
c2a20f1776
@ -239,14 +239,15 @@ class Transaction {
|
|||||||
// An overload of the above method that receives a PinnableSlice
|
// An overload of the above method that receives a PinnableSlice
|
||||||
// For backward compatibility a default implementation is provided
|
// For backward compatibility a default implementation is provided
|
||||||
virtual Status GetForUpdate(const ReadOptions& options,
|
virtual Status GetForUpdate(const ReadOptions& options,
|
||||||
ColumnFamilyHandle* /*column_family*/,
|
ColumnFamilyHandle* column_family,
|
||||||
const Slice& key, PinnableSlice* pinnable_val,
|
const Slice& key, PinnableSlice* pinnable_val,
|
||||||
bool /*exclusive*/ = true) {
|
bool exclusive = true) {
|
||||||
if (pinnable_val == nullptr) {
|
if (pinnable_val == nullptr) {
|
||||||
std::string* null_str = nullptr;
|
std::string* null_str = nullptr;
|
||||||
return GetForUpdate(options, key, null_str);
|
return GetForUpdate(options, column_family, key, null_str, exclusive);
|
||||||
} else {
|
} else {
|
||||||
auto s = GetForUpdate(options, key, pinnable_val->GetSelf());
|
auto s = GetForUpdate(options, column_family, key,
|
||||||
|
pinnable_val->GetSelf(), exclusive);
|
||||||
pinnable_val->PinSelf();
|
pinnable_val->PinSelf();
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user