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:
Maysam Yabandeh 2018-11-14 11:27:23 -08:00 committed by Facebook Github Bot
parent 0ed738fdd0
commit c2a20f1776

View File

@ -239,14 +239,15 @@ class Transaction {
// An overload of the above method that receives a PinnableSlice
// For backward compatibility a default implementation is provided
virtual Status GetForUpdate(const ReadOptions& options,
ColumnFamilyHandle* /*column_family*/,
ColumnFamilyHandle* column_family,
const Slice& key, PinnableSlice* pinnable_val,
bool /*exclusive*/ = true) {
bool exclusive = true) {
if (pinnable_val == nullptr) {
std::string* null_str = nullptr;
return GetForUpdate(options, key, null_str);
return GetForUpdate(options, column_family, key, null_str, exclusive);
} else {
auto s = GetForUpdate(options, key, pinnable_val->GetSelf());
auto s = GetForUpdate(options, column_family, key,
pinnable_val->GetSelf(), exclusive);
pinnable_val->PinSelf();
return s;
}