takeover: Cancel blocking commands (#1514)

* fix: Cancel blocking commands when performing a takeover

* Add some comments

* Make CancelBlocking a method of ConnectionContext

* add a small todo
This commit is contained in:
Roy Jacobson 2023-07-05 17:09:10 +02:00 committed by GitHub
parent 646f5304a5
commit 0f69d32b11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 47 additions and 14 deletions

View file

@ -1389,7 +1389,7 @@ void Transaction::FinishLogJournalOnShard(EngineShard* shard, uint32_t shard_cnt
journal->RecordEntry(txid_, journal::Op::EXEC, db_index_, shard_cnt, {}, false);
}
void Transaction::BreakOnShutdown() {
void Transaction::CancelBlocking() {
if (coordinator_state_ & COORD_BLOCKED) {
coordinator_state_ |= COORD_CANCELLED;
blocking_ec_.notify();