45 m_params(source, range_id, table, range) {
51 const uint8_t *ptr =
event->payload;
52 size_t remaining =
event->payload_len;
59 HT_INFOF(
"Entering RelinquishAcknowledge-%lld %s[%s..%s] (id=%lld) "
74 if (operation->remove_approval_add(0x01)) {
75 operation->record_state();
76 m_context->remove_move_operation(operation);
80 HT_WARNF(
"Skipping relinquish_acknowledge(%s %s[%s..%s] "
81 "because correspoing MoveRange does not exist",
87 HT_INFOF(
"Leaving RelinquishAcknowledge-%lld %s[%s..%s] (id=%lld) "
100 return "OperationRelinquishAcknowledge";
112 if (start_row.length() > 20)
113 start_row = start_row.substr(0, 10) +
".." +
114 start_row.substr(start_row.length()-10, 10);
116 if (end_row.length() > 20)
117 end_row = end_row.substr(0, 10) +
".." +
118 end_row.substr(end_row.length()-10, 10);
120 return format(
"RelinquishAcknowledge %s\\n%s\\n%s",
Retrieves system information (hardware, installation directory, etc)
virtual void execute()
Executes (carries out) the operation.
#define HT_WARNF(msg,...)
The FailureInducer simulates errors.
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.
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
RangeSpec & range_spec()
Gets range specification.
Declarations for OperationProcessor.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
virtual int64_t hash_code() const
Lib::Master::Request::Parameters::RelinquishAcknowledge m_params
Request parmaeters.
const char * get_text(int32_t state)
Declarations for ReferenceManager.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
const string & source() const
Gets name of source RangeServer.
virtual const String name()
Name of operation used for exclusivity.
Compatibility Macros for C/C++.
Functions to serialize/deserialize primitives to/from a memory buffer.
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
virtual void display_state(std::ostream &os)
Write human readable operation state to output stream.
long long int Lld
Shortcut for printf formats.
int64_t range_id() const
Gets range MetaLog entry identifier.
Declarations for general-purpose utility functions.
DependencySet m_dependencies
Set of dependencies.
#define HT_INFOF(msg,...)
OperationRelinquishAcknowledge(ContextPtr &context, EventPtr &event)
virtual const String label()
Human readable label for operation.
#define HT_MAYBE_FAIL(_label_)
void complete_ok(std::vector< MetaLog::EntityPtr > &additional)
std::shared_ptr< Operation > OperationPtr
Smart pointer to Operation.
TableIdentifier & table()
Gets table identifier.
String extensions and helpers: sets, maps, append operators etc.
Error codes, Exception handling, error logging.
virtual const String graphviz_label()
Human readable operation label used in graphviz output.
Executes user-defined functions when leaving the current scope.