fix(server): client pause fix on pipeline squash (#2180)

* fix(server): client pause fix on pipeline squash

allow squashing commands on pause
move await on client pause inside InvokeCommand - this way all flows of command invoke will read pause state

Signed-off-by: adi_holden <adi@dragonflydb.io>
This commit is contained in:
adiholden 2023-11-16 13:30:02 +02:00 committed by GitHub
parent b61d07d2c1
commit c95f4961be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 20 deletions

View file

@ -119,10 +119,6 @@ void ServerState::SetPauseState(ClientPause state, bool start) {
}
}
bool ServerState::IsPaused() const {
return client_pauses_[0] || client_pauses_[1];
}
void ServerState::AwaitPauseState(bool is_write) {
client_pause_ec_.await([is_write, this]() {
if (client_pauses_[int(ClientPause::ALL)]) {