mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
fix: do not migrate during connection close (#2570)
* fix: do not migrate during connection close Fixes #2569 Before the change we had a corner case where Dragonfly would call OnPreMigrateThread but would not call CancelOnErrorCb because OnBreakCb has already been called (it resets break_cb_engaged_) On the other hand in OnPostMigrateThread we called RegisterOnErrorCb if breaker_cb_ which resulted in double registration. This change simplifies the logic by removing break_cb_engaged_ flag since CancelOnErrorCb is safe to call if nothing is registered. Moreover, we now skip Migrate flow if a socket is being closed. --------- Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
6d11f86091
commit
4000adf57f
9 changed files with 46 additions and 33 deletions
|
@ -1441,6 +1441,9 @@ void DbSlice::TrackKeys(const facade::Connection::WeakRef& conn, const ArgSlice&
|
|||
}
|
||||
|
||||
void DbSlice::SendInvalidationTrackingMessage(std::string_view key) {
|
||||
if (client_tracking_map_.empty())
|
||||
return;
|
||||
|
||||
auto it = client_tracking_map_.find(key);
|
||||
if (it != client_tracking_map_.end()) {
|
||||
// notify all the clients.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue