feat(server): Support CLIENT TRACKING subcommand (1/2) (#2277)

The client tracking state is set by CLIENT TRACKING subcommand as well
as upon client disconnection.

Track the keys of a readonly command by maintaining mapping that maps
keys to the sets of tracking clients.
This commit is contained in:
Yue Li 2023-12-08 23:13:55 -08:00 committed by GitHub
parent 8323c82dc5
commit 64bbfc7063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 108 additions and 3 deletions

View file

@ -906,6 +906,12 @@ void Transaction::Conclude() {
Execute(std::move(cb), true);
}
void Transaction::Refurbish() {
txid_ = 0;
coordinator_state_ = 0;
cb_ptr_ = nullptr;
}
void Transaction::EnableShard(ShardId sid) {
unique_shard_cnt_ = 1;
unique_shard_id_ = sid;