Don't use slow BinlogKeyValue::erase_by_prefix for bots on each start.
This commit is contained in:
parent
861f0edab4
commit
97a401cd04
@ -424,7 +424,7 @@ class DownloadManagerImpl final : public DownloadManager {
|
||||
sent_counters_ = Counters();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!G()->td_db()->get_binlog_pmc()->get("dlds_counter").empty()) {
|
||||
G()->td_db()->get_binlog_pmc()->erase("dlds_counter");
|
||||
G()->td_db()->get_binlog_pmc()->erase_by_prefix("dlds#");
|
||||
}
|
||||
|
@ -13633,7 +13633,7 @@ void MessagesManager::init() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!td_->auth_manager_->is_bot()) {
|
||||
G()->td_db()->get_binlog_pmc()->erase_by_prefix("pinned_dialog_ids");
|
||||
G()->td_db()->get_binlog_pmc()->erase_by_prefix("last_server_dialog_date");
|
||||
G()->td_db()->get_binlog_pmc()->erase_by_prefix("unread_message_count");
|
||||
|
Loading…
Reference in New Issue
Block a user