0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros
Master.cc File Reference
#include <Common/Compat.h>
#include "Config.h"
#include "Event.h"
#include "Notification.h"
#include "Master.h"
#include "Session.h"
#include "SessionData.h"
#include <Common/Thread.h>
#include <Common/Error.h>
#include <Common/Path.h>
#include <Common/FileUtils.h>
#include <Common/StringExt.h>
#include <Common/Random.h>
#include <Common/SystemInfo.h>
#include <boost/algorithm/string.hpp>
#include <boost/tokenizer.hpp>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <dirent.h>
#include <fcntl.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/xattr.h>
#include <unistd.h>
Include dependency graph for Master.cc:

Go to the source code of this file.

Macros

#define HT_BDBTXN_BEGIN(parent_txn)
 
#define HT_BDBTXN_END_CB(_cb_)
 
#define HT_BDBTXN_END(...)
 

Macro Definition Documentation

#define HT_BDBTXN_BEGIN (   parent_txn)
Value:
do { \
BDbTxn txn;\
std::stringstream txn_str;\
HT_ASSERT(is_master());\
m_bdb_fs->start_transaction(txn); \
try
#define HT_ASSERT(_e_)
Definition: Logger.h:396

Definition at line 66 of file Master.cc.

#define HT_BDBTXN_END (   ...)
Value:
catch (Exception &e) { \
txn_str << txn; \
HT_INFOF("Berkeley DB deadlock encountered in txn %s", txn_str.str().c_str()); \
txn.abort(); \
this_thread::sleep_for(Random::duration_millis(3000)); \
continue; \
}\
txn_str << txn; \
HT_INFOF("Berkeley DB rep handle dead deadlock encountered in txn %s", txn_str.str().c_str()); \
txn.abort(); \
continue; \
}\
HT_ERRORF("%s - %s", Error::get_text(e.code()), e.what()); \
txn.abort(); \
return __VA_ARGS__; \
} \
HT_DEBUG_OUT << "end txn " << txn << HT_END; \
break; \
} while (true)
const char * get_text(int error)
Returns a descriptive error message.
Definition: Error.cc:330
#define HT_END
Definition: Logger.h:220
#define HT_ERROR_OUT
Definition: Logger.h:301
#define HT_INFOF(msg,...)
Definition: Logger.h:272
This is a generic exception class for Hypertable.
Definition: Error.h:314
#define HT_ERRORF(msg,...)
Definition: Logger.h:300
#define HT_DEBUG_OUT
Definition: Logger.h:261
int code() const
Returns the error code.
Definition: Error.h:391

Definition at line 101 of file Master.cc.

#define HT_BDBTXN_END_CB (   _cb_)
Value:
catch (Exception &e) { \
txn_str << txn; \
HT_INFOF("Berkeley DB deadlock encountered in txn %s", txn_str.str().c_str()); \
txn.abort(); \
this_thread::sleep_for(Random::duration_millis(3000)); \
continue; \
}\
txn_str << txn; \
HT_INFOF("Berkeley DB rep handle dead deadlock encountered in txn %s", txn_str.str().c_str()); \
txn.abort(); \
continue; \
}\
HT_ERRORF("%s - %s", Error::get_text(e.code()), e.what()); \
txn.abort(); \
_cb_->error(e.code(), e.what()); \
return; \
} \
HT_DEBUG_OUT << "end txn " << txn << HT_END; \
break; \
} while (true)
const char * get_text(int error)
Returns a descriptive error message.
Definition: Error.cc:330
#define HT_END
Definition: Logger.h:220
#define HT_ERROR_OUT
Definition: Logger.h:301
#define HT_INFOF(msg,...)
Definition: Logger.h:272
This is a generic exception class for Hypertable.
Definition: Error.h:314
#define HT_ERRORF(msg,...)
Definition: Logger.h:300
#define HT_DEBUG_OUT
Definition: Logger.h:261
int code() const
Returns the error code.
Definition: Error.h:391

Definition at line 74 of file Master.cc.