40 size_t total_servers =
m_context->rsc_manager->server_count();
41 size_t connected_servers =
m_context->available_server_count();
43 =
m_context->props->get_i32(
"Hypertable.Failover.Quorum.Percentage");
44 size_t quorum = ((total_servers * failover_pct) + 99) / 100;
46 HT_INFOF(
"total_servers=%d connected_servers=%d quorum=%d",
47 (
int)total_servers, (
int)connected_servers, (
int)quorum);
49 if (connected_servers < quorum || connected_servers == 0) {
51 HT_INFOF(
"Only %d servers ready, total servers=%d quorum=%d,"
52 " waiting for servers ...", (
int)connected_servers,
53 (
int)total_servers, (
int)quorum);
68 uint32_t millis = 2 *
m_context->props->get_i32(
"Hypertable.Failover.GracePeriod");
69 m_context->recovery_barrier_op->advance_into_future(millis);
82 return "OperationRecoveryBlocker";
86 return "RecoveryBlocker";
virtual const String label()
Human readable label for operation.
ContextPtr m_context
Pointer to Master context.
Abstract base class for ephemeral operations.
std::string String
A String is simply a typedef to std::string.
Declarations for OperationProcessor.
const char * get_text(int32_t state)
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
void set_state(int32_t state)
Compatibility Macros for C/C++.
virtual const String name()
Name of operation used for exclusivity.
OperationRecoveryBlocker(ContextPtr &context)
virtual void execute()
Executes (carries out) the operation.
const char * RECOVERY_BLOCKER
long long int Lld
Shortcut for printf formats.
DependencySet m_obstructions
Set of obstructions.
#define HT_INFOF(msg,...)
std::shared_ptr< Operation > OperationPtr
Smart pointer to Operation.
Error codes, Exception handling, error logging.