Remove unused wait_binlog_replay_finish.
GitOrigin-RevId: 3b48057703b70f8b4d9ec8b17b14ea75418bda4c
This commit is contained in:
parent
52651a2efb
commit
f7caca6023
@ -12,7 +12,6 @@
|
|||||||
#include "td/telegram/TdParameters.h"
|
#include "td/telegram/TdParameters.h"
|
||||||
|
|
||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
#include "td/actor/Condition.h"
|
|
||||||
#include "td/actor/PromiseFuture.h"
|
#include "td/actor/PromiseFuture.h"
|
||||||
#include "td/actor/SchedulerLocalStorage.h"
|
#include "td/actor/SchedulerLocalStorage.h"
|
||||||
|
|
||||||
@ -337,14 +336,6 @@ class Global : public ActorContext {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void wait_binlog_replay_finish(Promise<> promise) {
|
|
||||||
binlog_replay_finish_.wait(std::move(promise));
|
|
||||||
}
|
|
||||||
|
|
||||||
void on_binlog_replay_finish() {
|
|
||||||
binlog_replay_finish_.set_true();
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_close_flag() {
|
void set_close_flag() {
|
||||||
close_flag_ = true;
|
close_flag_ = true;
|
||||||
}
|
}
|
||||||
@ -371,7 +362,6 @@ class Global : public ActorContext {
|
|||||||
std::shared_ptr<DhConfig> dh_config_;
|
std::shared_ptr<DhConfig> dh_config_;
|
||||||
|
|
||||||
unique_ptr<TdDb> td_db_;
|
unique_ptr<TdDb> td_db_;
|
||||||
Condition binlog_replay_finish_;
|
|
||||||
|
|
||||||
ActorId<Td> td_;
|
ActorId<Td> td_;
|
||||||
ActorId<AnimationsManager> animations_manager_;
|
ActorId<AnimationsManager> animations_manager_;
|
||||||
|
@ -4378,13 +4378,10 @@ Status Td::init(DbKey key) {
|
|||||||
// -- All actors have one "entry point". So there is only one way to send query to them. So all queries are ordered
|
// -- All actors have one "entry point". So there is only one way to send query to them. So all queries are ordered
|
||||||
// for each Actor.
|
// for each Actor.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// 2. An actor must not make some decisions before all binlog events are processed.
|
// 2. An actor must not make some decisions before all binlog events are processed.
|
||||||
// For example, SecretChatActor must not send RequestKey, before it receives logevent with RequestKey and understands
|
// For example, SecretChatActor must not send RequestKey, before it receives logevent with RequestKey and understands
|
||||||
// that RequestKey was already sent.
|
// that RequestKey was already sent.
|
||||||
//
|
//
|
||||||
// -- G()->wait_binlog_replay_finish(Promise<>);
|
|
||||||
//
|
|
||||||
// 3. During replay of binlog some queries may be sent to other actors. They shouldn't process such events before all
|
// 3. During replay of binlog some queries may be sent to other actors. They shouldn't process such events before all
|
||||||
// their binlog events are processed. So actor may receive some old queries. It must be in it's actual state in
|
// their binlog events are processed. So actor may receive some old queries. It must be in it's actual state in
|
||||||
// orded to handle them properly.
|
// orded to handle them properly.
|
||||||
@ -4403,8 +4400,6 @@ Status Td::init(DbKey key) {
|
|||||||
send_closure_later(notification_manager_actor_, &NotificationManager::on_binlog_events,
|
send_closure_later(notification_manager_actor_, &NotificationManager::on_binlog_events,
|
||||||
std::move(events.to_notification_manager));
|
std::move(events.to_notification_manager));
|
||||||
|
|
||||||
// NB: be very careful. This notification may be received before all binlog events are.
|
|
||||||
G()->on_binlog_replay_finish();
|
|
||||||
send_closure(secret_chats_manager_, &SecretChatsManager::binlog_replay_finish);
|
send_closure(secret_chats_manager_, &SecretChatsManager::binlog_replay_finish);
|
||||||
|
|
||||||
VLOG(td_init) << "Ping datacenter";
|
VLOG(td_init) << "Ping datacenter";
|
||||||
|
Reference in New Issue
Block a user