Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update components for txn file in serverless #9224

Merged
merged 7 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
a
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
CalvinNeo committed Jul 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 695429ed21020b3f4458667c61ed0db6d8c78f1e
6 changes: 6 additions & 0 deletions dbms/src/Storages/KVStore/TiKVHelpers/DecodedLockCFValue.cpp
Original file line number Diff line number Diff line change
@@ -81,6 +81,11 @@ inline void decodeLockCfValue(DecodedLockCFValue & res)
res.txn_size = readUInt64(data, len);
break;
}
case IS_TXN_FILE_PREFIX:
{
res.is_txn_file = true;
break;
}
CalvinNeo marked this conversation as resolved.
Show resolved Hide resolved
case ASYNC_COMMIT_PREFIX:
{
res.use_async_commit = true;
@@ -159,6 +164,7 @@ void DecodedLockCFValue::intoLockInfo(kvrpcpb::LockInfo & res) const
res.set_txn_size(txn_size);
res.set_use_async_commit(use_async_commit);
res.set_key(decodeTiKVKey(*key));
res.set_is_txn_file(is_txn_file);

if (use_async_commit)
{
1 change: 1 addition & 0 deletions dbms/src/Storages/KVStore/TiKVHelpers/DecodedLockCFValue.h
Original file line number Diff line number Diff line change
@@ -39,6 +39,7 @@ struct DecodedLockCFValue : boost::noncopyable
UInt64 min_commit_ts{0};
std::string_view secondaries;
std::string_view primary_lock;
bool is_txn_file{0};
CalvinNeo marked this conversation as resolved.
Show resolved Hide resolved
// For large txn, generation is not zero.
UInt64 generation{0};
};
1 change: 1 addition & 0 deletions dbms/src/Storages/KVStore/TiKVHelpers/TiKVRecordFormat.h
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@ static const char SHORT_VALUE_PREFIX = 'v';
static const char MIN_COMMIT_TS_PREFIX = 'c';
static const char FOR_UPDATE_TS_PREFIX = 'f';
static const char TXN_SIZE_PREFIX = 't';
static const char IS_TXN_FILE_PREFIX = 'T';
static const char ASYNC_COMMIT_PREFIX = 'a';
static const char ROLLBACK_TS_PREFIX = 'r';
static const char FLAG_OVERLAPPED_ROLLBACK = 'R';