Don't use slow BinlogKeyValue::erase_by_prefix for bots on each start.

This commit is contained in:
levlam 2023-10-12 22:53:12 +03:00
parent 861f0edab4
commit 97a401cd04
2 changed files with 2 additions and 2 deletions

View File

@ -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#");
}

View File

@ -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");