From c2a20f1776751d64519deaa4a98bd6f3ca2d325b Mon Sep 17 00:00:00 2001 From: Maysam Yabandeh Date: Wed, 14 Nov 2018 11:27:23 -0800 Subject: [PATCH] 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 --- include/rocksdb/utilities/transaction.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/rocksdb/utilities/transaction.h b/include/rocksdb/utilities/transaction.h index 86627d4f4..c1e2441bc 100644 --- a/include/rocksdb/utilities/transaction.h +++ b/include/rocksdb/utilities/transaction.h @@ -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; }