InfiniSQL
v0.1.2-alpha
Massive Scale Transaction Processing
|
Contains main and various global function definitions. More...
Go to the source code of this file.
Functions | |
void * | topologyMgr (void *) |
int | main (int argc, char **argv) |
void | msgpack2Vector (vector< string > *resultvector, char *payload, int64_t length) |
convert msgpack to a vector of strings More... | |
void | debug (char *description, int line, char *file) |
char | setdeleteflag (char *c) |
for delete operations on row More... | |
bool | getdeleteflag (char c) |
check if row operation is delete More... | |
char | cleardeleteflag (char *c) |
clear delete operation on row More... | |
char | setinsertflag (char *c) |
for insert operations on row More... | |
bool | getinsertflag (char c) |
check if row operation is insert More... | |
char | clearinsertflag (char *c) |
clear insert operation on row More... | |
bool | setwritelock (char *c) |
set write lock on row More... | |
bool | setreadlock (char *c) |
set read lock on row More... | |
char | clearlockedflag (char *c) |
clear locked flag on row More... | |
locktype_e | getlocktype (char c) |
check if row is locked and type More... | |
char | clearreplacedeleteflag (char *c) |
clear row as deleted as part of row replacement More... | |
bool | getreplacedeleteflag (char c) |
get whether or not row is deleted as part of row replacement More... | |
char | setreplacedeleteflag (char *c) |
set delete as part of replace row flag More... | |
int16_t | getPartitionid (fieldValue_s &fieldVal, fieldtype_e type, int16_t numpartitions) |
hash of field value for partition id More... | |
void | like2Regex (string &likeStr) |
might be orpha, but convert LIKE operand to regex More... | |
bool | compareFields (fieldtype_e type, const fieldValue_s &val1, const fieldValue_s &val2) |
compare field values for equality More... | |
void | trimspace (string &input) |
void | stagedRow2ReturnRow (const stagedRow_s &stagedRow, returnRow_s &returnRow) |
convert stagedRow_s to returnRow_s More... | |
void | setprio () |
set real-time priority More... | |
Variables | |
FILE * | logfile |
cfg_s | cfgs |
std::string | zmqsocket |
class Topology | nodeTopology |
pthread_mutex_t | nodeTopologyMutex |
pthread_mutex_t | connectionsMutex |
void * | zmqcontext |
std::string | storedprocprefix = "InfiniSQL_" |
std::vector< class MboxProducer * > | socketAffinity |
std::vector< listenertype_e > | listenerTypes |
Contains main and various global function definitions.
Definition in file main.cc.
char cleardeleteflag | ( | char * | c) |
clear delete operation on row
c | rowdata_s flags |
Definition at line 156 of file main.cc.
References DELETEFLAG.
Referenced by Table::commitRollbackUnlock().
char clearinsertflag | ( | char * | c) |
clear insert operation on row
c | rowdata_s flags |
Definition at line 171 of file main.cc.
References INSERTFLAG.
char clearlockedflag | ( | char * | c) |
clear locked flag on row
c | rowdata_s flags |
Definition at line 200 of file main.cc.
References LOCKEDFLAG.
Referenced by Table::commitRollbackUnlock().
char clearreplacedeleteflag | ( | char * | c) |
clear row as deleted as part of row replacement
c | rowdata_s flags |
Definition at line 222 of file main.cc.
References REPLACEDELETEFLAG.
Referenced by Table::commitRollbackUnlock().
bool compareFields | ( | fieldtype_e | type, |
const fieldValue_s & | val1, | ||
const fieldValue_s & | val2 | ||
) |
compare field values for equality
type | field type |
val1 | operand 1 |
val2 | operand 2 |
Definition at line 305 of file main.cc.
References BOOL, fieldInput_u::boolean, CHAR, fieldInput_u::character, CHARX, FLOAT, fieldInput_u::floating, INT, fieldInput_u::integer, fieldValue_s::isnull, fieldValue_s::str, UINT, fieldInput_u::uinteger, fieldValue_s::value, and VARCHAR.
Referenced by Statement::andPredicate(), Statement::stagedPredicate(), and Statement::subqueryUnique().
void debug | ( | char * | description, |
int | line, | ||
char * | file | ||
) |
bool getdeleteflag | ( | char | c) |
check if row operation is delete
c | rowdata_s flags |
Definition at line 151 of file main.cc.
References DELETEFLAG.
Referenced by Table::commitRollbackUnlock().
bool getinsertflag | ( | char | c) |
check if row operation is insert
c | rowdata_s flags |
Definition at line 166 of file main.cc.
References INSERTFLAG.
Referenced by Table::assignToLockQueue(), Table::commitRollbackUnlock(), and Table::getrows().
locktype_e getlocktype | ( | char | c) |
check if row is locked and type
c | rowdata_s flags |
Definition at line 205 of file main.cc.
References LOCKEDFLAG, LOCKTYPEFLAG, NOLOCK, READLOCK, and WRITELOCK.
Referenced by Table::commitRollbackUnlock(), Table::deleterow(), Table::getrows(), Table::selectrows(), and Table::updaterow().
int16_t getPartitionid | ( | fieldValue_s & | fieldVal, |
fieldtype_e | type, | ||
int16_t | numpartitions | ||
) |
hash of field value for partition id
fieldVal | field value |
type | field type |
numpartitions | number of partitions |
Definition at line 237 of file main.cc.
References BOOL, fieldInput_u::boolean, CHAR, fieldInput_u::character, CHARX, FLOAT, fieldInput_u::floating, SpookyHash::Hash64(), INT, fieldInput_u::integer, fieldValue_s::str, UINT, fieldInput_u::uinteger, fieldValue_s::value, and VARCHAR.
Referenced by TransactionAgent::handledispatch().
bool getreplacedeleteflag | ( | char | c) |
get whether or not row is deleted as part of row replacement
c | rowdata_s flags |
Definition at line 227 of file main.cc.
References REPLACEDELETEFLAG.
Referenced by Table::commitRollbackUnlock().
void like2Regex | ( | string & | likeStr) |
might be orpha, but convert LIKE operand to regex
likeStr | LIKE operand |
Definition at line 289 of file main.cc.
Referenced by Statement::andPredicate(), Index::like(), and Index::notlike().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 47 of file main.cc.
References Topology::addressStruct::actorid, Topology::partitionAddress::address, cfg_s::compressgw, connectionsMutex, Topology::partitionAddress::instance, logfile, Topology::partitionAddress::mbox, Topology::addressStruct::nodeid, Topology::nodeid, nodeTopology, nodeTopologyMutex, topologyMgr(), Topology::partitionAddress::type, zmqcontext, and zmqsocket.
void msgpack2Vector | ( | vector< string > * | resultvector, |
char * | payload, | ||
int64_t | length | ||
) |
convert msgpack to a vector of strings
resultvector | output |
payload | msgpack data |
length | msgpack length |
Definition at line 133 of file main.cc.
Referenced by TransactionAgent::compile(), TransactionAgent::login(), TransactionAgent::newprocedure(), and UserSchemaMgr::UserSchemaMgr().
char setdeleteflag | ( | char * | c) |
for delete operations on row
c | rowdata_s flags |
Definition at line 146 of file main.cc.
References DELETEFLAG.
Referenced by Table::deleterow().
char setinsertflag | ( | char * | c) |
for insert operations on row
c | rowdata_s flags |
Definition at line 161 of file main.cc.
References INSERTFLAG.
Referenced by Table::newrow().
void setprio | ( | ) |
set real-time priority
for IbGateway and ObGateway to maximize throughput. Needs to be configured at OS level
Definition at line 424 of file main.cc.
References logfile, and RTPRIO.
Referenced by IbGateway::IbGateway(), and ObGateway::updateRemoteGateways().
bool setreadlock | ( | char * | c) |
set read lock on row
c | rowdata_s flags |
Definition at line 188 of file main.cc.
References LOCKEDFLAG, and LOCKTYPEFLAG.
Referenced by Table::commitRollbackUnlock(), Table::getrows(), and Table::selectrows().
char setreplacedeleteflag | ( | char * | c) |
set delete as part of replace row flag
c | rowdata_s flags |
Definition at line 232 of file main.cc.
References REPLACEDELETEFLAG.
Referenced by Table::deleterow().
bool setwritelock | ( | char * | c) |
set write lock on row
c | rowdata_s flags |
Definition at line 176 of file main.cc.
References LOCKEDFLAG, and LOCKTYPEFLAG.
Referenced by Table::getrows(), Table::newrow(), and Table::selectrows().
void stagedRow2ReturnRow | ( | const stagedRow_s & | stagedRow, |
returnRow_s & | returnRow | ||
) |
convert stagedRow_s to returnRow_s
stagedRow | input stagedRow_s |
returnRow | output returnRow_s |
Definition at line 396 of file main.cc.
References stagedRow_s::cmd, INSERT, returnRow_s::locktype, stagedRow_s::locktype, stagedRow_s::newRow, stagedRow_s::newrowid, NOCOMMAND, stagedRow_s::originalRow, stagedRow_s::originalrowid, returnRow_s::previoussubtransactionid, stagedRow_s::previoussubtransactionid, returnRow_s::row, returnRow_s::rowid, and UPDATE.
Referenced by Statement::branchtotype(), and Statement::stagedPredicate().
void* topologyMgr | ( | void * | identity) |
Launcher function for TopologyMgr actor
Definition at line 599 of file TopologyMgr.cc.
Referenced by main().
void trimspace | ( | string & | input) |
Definition at line 382 of file main.cc.
Referenced by Index::between(), Index::comparison(), Transaction::continueCommitTransaction(), Index::deleteNonuniqueEntry(), Index::deleteUniqueEntry(), Transaction::getengine(), Transaction::getEngineid(), Index::getequal_f(), Index::getnotequal(), Index::getnotin(), Index::insertNonuniqueEntry(), Index::like(), Index::notlike(), Index::replaceNonunique(), Index::replaceUnique(), and SubTransaction::uniqueIndex().
cfg_s cfgs |
Definition at line 37 of file main.cc.
Referenced by IbGateway::inbufhandler(), TransactionAgent::login(), ObGateway::ObGateway(), and TransactionAgent::TransactionAgent().
pthread_mutex_t connectionsMutex |
Definition at line 41 of file main.cc.
Referenced by Listener::Listener(), main(), and Pg::pgclosesocket().
std::vector<listenertype_e> listenerTypes |
Definition at line 45 of file main.cc.
Referenced by Listener::Listener(), and Pg::pgclosesocket().
FILE* logfile |
Definition at line 36 of file main.cc.
Referenced by UserSchemaMgr::addcolumn(), TransactionAgent::addcolumn(), Table::addfield(), Statement::andPredicate(), TransactionAgent::badMessageHandler(), Index::between(), TransactionAgent::changepassword(), Index::checkAndLock(), Transaction::checkLock(), Transaction::checkSqlLock(), Index::commitRollback(), SubTransaction::commitRollbackUnlock(), Table::commitRollbackUnlock(), Index::comparison(), Transaction::continueCommitTransaction(), Transaction::continueFetchRows(), Transaction::continueInsertRow(), Pg::continuePgCommitexplicit(), Pg::continuePgCommitimplicit(), Pg::continuePgFunc(), Pg::continuePgRollbackexplicit(), Pg::continuePgRollbackimplicit(), Transaction::continueReplaceRow(), Transaction::continueRollbackTransaction(), Transaction::continueSelectRows(), Transaction::continueSqlInsert(), Transaction::continueSqlPredicate(), Transaction::continueUnlockRow(), Transaction::continueUpdateRow(), TransactionAgent::createdomain(), UserSchemaMgr::createschema(), TransactionAgent::createschema(), UserSchemaMgr::createtable(), TransactionAgent::createtable(), TransactionAgent::createuser(), DeadlockMgr::DeadlockMgr(), debug(), TransactionAgent::deletedomain(), UserSchemaMgr::deleteindex(), TransactionAgent::deleteindex(), Table::deleterow(), UserSchemaMgr::deleteschema(), TransactionAgent::deleteschema(), UserSchemaMgr::deletetable(), TransactionAgent::deletetable(), Index::deleteUniqueEntry(), TransactionAgent::deleteuser(), SubTransaction::drainIndexLockQueue(), Engine::Engine(), Transaction::getengine(), Transaction::getEngineid(), Index::getequal_f(), Index::getnotequal(), Index::getnotin(), Index::getnotnulls(), Table::getrows(), IbGateway::IbGateway(), SubTransaction::indexSearch(), Pg::initcmd(), Listener::Listener(), TransactionAgent::login(), main(), Index::makeindex(), Table::makerow(), Topology::newActor(), Pg::pgclosesocket(), SubTransaction::processTransactionMessage(), Transaction::processTransactionMessage(), Index::regex(), IbGateway::removefds(), Index::replaceUnique(), TransactionAgent::schemaBoilerplate(), Transaction::select(), Table::selectrows(), Message::ser(), MessageSocket::ser(), MessageUserSchema::ser(), MessageDeadlock::ser(), MessageTransaction::ser(), MessageSubtransactionCmd::ser(), MessageCommitRollback::ser(), MessageDispatch::ser(), MessageAckDispatch::ser(), MessageApply::ser(), MessageAckApply::ser(), setprio(), Listener::startsocket(), TopologyMgr::TopologyMgr(), TransactionAgent::TransactionAgent(), Table::unmakerow(), ObGateway::updateRemoteGateways(), Table::updaterow(), and UserSchemaMgr::UserSchemaMgr().
class Topology nodeTopology |
Definition at line 39 of file main.cc.
Referenced by Transaction::continueCommitTransaction(), Transaction::getengine(), Transaction::getEngineid(), main(), Operation::Operation(), Transaction::select(), Transaction::sqlPredicate(), Transaction::sqlSelectAll(), TopologyMgr::TopologyMgr(), Mboxes::update(), TopologyMgr::updateGlobalConfig(), and TopologyMgr::updateLocalConfig().
pthread_mutex_t nodeTopologyMutex |
Definition at line 40 of file main.cc.
Referenced by main(), Mboxes::update(), TopologyMgr::updateGlobalConfig(), and TopologyMgr::updateLocalConfig().
std::vector<class MboxProducer *> socketAffinity |
Definition at line 44 of file main.cc.
Referenced by Listener::Listener(), and Pg::pgclosesocket().
std::string storedprocprefix = "InfiniSQL_" |
Definition at line 43 of file main.cc.
Referenced by Pg::continueLogin(), and TransactionAgent::newprocedure().
void* zmqcontext |
Definition at line 42 of file main.cc.
Referenced by main(), and TopologyMgr::TopologyMgr().
std::string zmqsocket |
Definition at line 38 of file main.cc.
Referenced by main(), and TopologyMgr::TopologyMgr().