refactor client tracking, fix atomicity, squashing and multi/exec (#2970)

* add partial support for CLIENT CACHING TRUE (only to be used with TRACKING OPTIN)
* add OPTIN to CLIENT TRACKING command
* refactor client tracking to respect transactional atomicity
* fixed multi/exec and disabled squashing with client tracking
* add tests
This commit is contained in:
Kostas Kyrimis 2024-06-03 22:14:30 +03:00 committed by GitHub
parent 6e6c91aeaf
commit b1063f7823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 351 additions and 87 deletions

View file

@ -691,8 +691,12 @@ void Transaction::RunCallback(EngineShard* shard) {
}
// Log to journal only once the command finished running
if ((coordinator_state_ & COORD_CONCLUDING) || (multi_ && multi_->concluding))
if ((coordinator_state_ & COORD_CONCLUDING) || (multi_ && multi_->concluding)) {
LogAutoJournalOnShard(shard, result);
if (tracking_cb_) {
tracking_cb_(this);
}
}
}
// TODO: For multi-transactions we should be able to deduce mode() at run-time based