Skip to content

Commit

Permalink
Merge branch 'release-6.5' into cherry-pick-6796-to-release-6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-shaoge authored Apr 4, 2023
2 parents a53f4f4 + 4011355 commit 273960d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dbms/src/Storages/Transaction/RegionCFDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ inline void decodeLockCfValue(DecodedLockCFValue & res)
UNUSED(versions_to_last_change);
break;
}
case TXN_SOURCE_PREFIX_FOR_LOCK:
{
// Used for CDC, useless for TiFlash.
UInt64 txn_source_prefic = readVarUInt(data, len);
UNUSED(txn_source_prefic);
break;
}
default:
{
std::string msg = std::string("invalid flag ") + flag + " in lock value " + value.toDebugString();
Expand Down
18 changes: 18 additions & 0 deletions dbms/src/Storages/Transaction/TiKVRecordFormat.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ static const char ROLLBACK_TS_PREFIX = 'r';
static const char FLAG_OVERLAPPED_ROLLBACK = 'R';
static const char GC_FENCE_PREFIX = 'F';
static const char LAST_CHANGE_PREFIX = 'l';
static const char TXN_SOURCE_PREFIX_FOR_WRITE = 'S';
static const char TXN_SOURCE_PREFIX_FOR_LOCK = 's';

static const size_t SHORT_VALUE_MAX_LEN = 64;

Expand Down Expand Up @@ -419,6 +421,22 @@ inline DecodedWriteCFValue decodeWriteCfValue(const TiKVValue & value)
* rewriting record and there must be a complete row written to tikv, just ignore it in tiflash.
*/
return std::nullopt;
case RecordKVFormat::LAST_CHANGE_PREFIX:
{
// Used to accelerate TiKV MVCC scan, useless for TiFlash.
UInt64 last_change_ts = readUInt64(data, len);
UInt64 versions_to_last_change = readVarUInt(data, len);
UNUSED(last_change_ts);
UNUSED(versions_to_last_change);
break;
}
case RecordKVFormat::TXN_SOURCE_PREFIX_FOR_WRITE:
{
// Used for CDC, useless for TiFlash.
UInt64 txn_source_prefic = readVarUInt(data, len);
UNUSED(txn_source_prefic);
break;
}
default:
throw Exception("invalid flag " + std::to_string(flag) + " in write cf", ErrorCodes::LOGICAL_ERROR);
}
Expand Down

0 comments on commit 273960d

Please sign in to comment.