diff --git a/utilities/transactions/transaction_base.cc b/utilities/transactions/transaction_base.cc index cb17fab4a..2754d38cb 100644 --- a/utilities/transactions/transaction_base.cc +++ b/utilities/transactions/transaction_base.cc @@ -502,7 +502,7 @@ void TransactionBaseImpl::UndoGetForUpdate(ColumnFamilyHandle* column_family, auto& cf_tracked_keys = tracked_keys_[column_family_id]; std::string key_str = key.ToString(); bool can_decrement = false; - bool can_unlock = false; + bool can_unlock __attribute__((unused)) = false; if (save_points_ != nullptr && !save_points_->empty()) { // Check if this key was fetched ForUpdate in this SavePoint