31 lock_guard<mutex> lock(m_mutex);
32 m_root_complete =
true;
33 m_root_complete_cond.notify_all();
37 lock_guard<mutex> lock(m_mutex);
38 m_metadata_complete =
true;
39 m_metadata_complete_cond.notify_all();
43 lock_guard<mutex> lock(m_mutex);
44 m_system_complete =
true;
45 m_system_complete_cond.notify_all();
49 lock_guard<mutex> lock(m_mutex);
50 m_user_complete =
true;
51 m_user_complete_cond.notify_all();
57 unique_lock<mutex> lock(m_mutex);
58 HT_INFO(
"Waiting for ROOT recovery to complete...");
59 return m_root_complete_cond.wait_until(lock, deadline,
60 [
this](){
return m_root_complete; });
64 if (m_metadata_complete)
66 unique_lock<mutex> lock(m_mutex);
67 HT_INFO(
"Waiting for METADATA recovery to complete...");
68 return m_metadata_complete_cond.wait_until(lock, deadline,
69 [
this](){
return m_metadata_complete; });
73 if (m_system_complete)
75 unique_lock<mutex> lock(m_mutex);
76 HT_INFO(
"Waiting for SYSTEM recovery to complete...");
77 return m_system_complete_cond.wait_until(lock, deadline,
78 [
this](){
return m_system_complete; });
84 unique_lock<mutex> lock(m_mutex);
85 HT_INFO(
"Waiting for USER recovery to complete...");
86 return m_user_complete_cond.wait_until(lock, deadline,
87 [
this](){
return m_user_complete; });
98 return wait_for_root(deadline);
100 return wait_for_metadata(deadline);
103 return wait_for_system(deadline);
104 return wait_for_user(deadline);
113 return wait_for_metadata(deadline);
115 return wait_for_system(deadline);
116 return wait_for_user(deadline);
120 lock_guard<mutex> lock(m_mutex);
121 return m_user_complete;
bool wait_for_root(ClockT::time_point deadline)
Waits for ROOT commit log replay to complete.
Declarations for LogReplayBarrier.
chrono::time_point< fast_clock > time_point
void set_root_complete()
Signals ROOT commit log replay has been completed.
void set_user_complete()
Signals USER commit log replay has been completed.
bool wait_for_user(ClockT::time_point deadline)
Waits for USER commit log replay to complete.
Compatibility Macros for C/C++.
bool wait_for_system(ClockT::time_point deadline)
Waits for SYSTEM commit log replay to complete.
void set_system_complete()
Signals SYSTEM commit log replay has been completed.
void set_metadata_complete()
Signals METADATA commit log replay has been completed.
static const char * END_ROOT_ROW
bool user_complete()
Checks if replay of USER commit log is complete.
bool wait(ClockT::time_point deadline, const TableIdentifier &table, const RangeSpec &range)
Waits for commit log replay to complete for range class defined by a given range. ...
bool wait_for_metadata(ClockT::time_point deadline)
Waits for METADATA commit log replay to complete.