MCPcopy Create free account
hub / github.com/Tencent/phxqueue / DoRun

Method DoRun

phxqueue/store/keepsyncthread.cpp:79–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void KeepSyncThread::DoRun() {
80 if (!impl_->store) {
81 return;
82 }
83
84 const int ngroup = impl_->store->GetStoreOption()->ngroup;
85 impl_->next_make_cp_times.reset(new time_t[ngroup]);
86 impl_->next_sync_times.reset(new time_t[ngroup]);
87 for (int i{0}; i < ngroup; ++i) {
88 impl_->next_make_cp_times[i] = 0;
89 impl_->next_sync_times[i] = 0;
90 }
91
92 while (1) {
93 if (impl_->stop) return;
94
95 sleep(1);
96
97 ClearSyncCtrl();
98
99 MakeCheckPoint();
100
101 SyncCursorID();
102
103 Replay();
104
105 ReportBacklog();
106
107 ReportDelayStat();
108 }
109}
110
111void KeepSyncThread::ClearSyncCtrl() {
112 QLVerb("KeepSyncThread::ClearSyncCtrl");

Callers

nothing calls this directly

Calls 1

GetStoreOptionMethod · 0.80

Tested by

no test coverage detected