Skip to content

Commit

Permalink
remove unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu committed Jun 27, 2022
1 parent 912728d commit 032738e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions dbms/src/Storages/Transaction/RegionCFDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ size_t RegionCFDataBase<Trait>::calcTiKVKeyValueSize(const Value & value)
return calcTiKVKeyValueSize(getTiKVKey(value), *getTiKVValuePtr(value));
}

template <>
size_t RegionCFDataBase<RegionLockCFDataTrait>::calcTiKVKeyValueSize(const Value & value)
{
std::ignore = value;
return 0;
return calcTiKVKeyValueSize(getTiKVKey(value), *getTiKVValuePtr(value));
}

template <typename Trait>
size_t RegionCFDataBase<Trait>::calcTiKVKeyValueSize(const TiKVKey & key, const TiKVValue & value)
{
Expand Down Expand Up @@ -275,11 +267,10 @@ template struct RegionCFDataBase<RegionLockCFDataTrait>;
namespace RecordKVFormat
{
// https://github.com/tikv/tikv/blob/master/components/txn_types/src/lock.rs
inline std::pair<size_t, size_t> decodeLockCfValue(DecodedLockCFValue & res, std::shared_ptr<const TiKVValue> & value)
inline void decodeLockCfValue(DecodedLockCFValue & res, std::shared_ptr<const TiKVValue> & value)
{
const char * data = value->data();
size_t total_size = value->dataSize();
size_t len = total_size;
size_t len = value->dataSize();

kvrpcpb::Op lock_type = kvrpcpb::Op_MIN;
switch (readUInt8(data, len))
Expand Down Expand Up @@ -365,7 +356,6 @@ inline std::pair<size_t, size_t> decodeLockCfValue(DecodedLockCFValue & res, std
if (len != 0)
throw Exception("invalid lock value " + value->toDebugString(), ErrorCodes::LOGICAL_ERROR);
}
return std::make_pair(0, 0);
}

DecodedLockCFValue::DecodedLockCFValue(std::shared_ptr<const TiKVKey> & key_, std::shared_ptr<const TiKVValue> & val_)
Expand Down

0 comments on commit 032738e

Please sign in to comment.