InfiniSQL
v0.1.2-alpha
Massive Scale Transaction Processing
|
create Transaction object More...
#include <Transaction.h>
Classes | |
struct | cmdState_s |
state for pending transactional activities More... | |
struct | sqlcmdstate_s |
state for pending SQL commands More... | |
Public Types | |
enum | transactionstate_e { EXPANDING, DISPATCHING, COMMITTING, COMMITTED, ABORTING, ABORTED } |
state of Transaction, possibly an orphan More... | |
Public Member Functions | |
Transaction (class TransactionAgent *taPtrarg, int64_t domainidarg) | |
virtual | ~Transaction () |
void | zeroCurrentCmdState () |
clear current command state More... | |
void | processTransactionMessage (class Message *msgrcvarg) |
execute continuation based on MessageTransaction reply More... | |
int64_t | getEngineid (class Table *tablePtr, int64_t fieldnum) |
get engineid/partitionid based on hash of this fieldValues More... | |
int64_t | getEngineid (class Table *tablePtr, int64_t fieldid, fieldValue_s *val) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (int64_t input) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (uint64_t input) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (bool input) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (long double input) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (char input) |
get engine/partitionid based on hash of input More... | |
int64_t | getEngineid (string *input) |
get engine/partitionid based on hash of input More... | |
int64_t | getengine (fieldtype_e fieldtype, fieldValue_s &fieldValue) |
get engine/partitionid based on hash of input More... | |
void | dispatch (class Message *msgrcv) |
orphan, never implemented so far, stub More... | |
void | dispatched (class Message *msgrcv) |
orphan, never implemented so far, stub More... | |
void | checkLock (deadlockchange_e changetype, bool isrow, int64_t rowid, int64_t tableid, int64_t engineid, int64_t fieldid, fieldValue_s *fieldValue) |
based on type of lock and other factors, intiate deadlock management More... | |
void | badMessageHandler () |
stub for unhandleable Message variant received More... | |
void | addFieldToRow () |
deprecated More... | |
void | addFieldToRow (int64_t val) |
deprecated More... | |
void | addFieldToRow (uint64_t val) |
deprecated More... | |
void | addFieldToRow (bool val) |
deprecated More... | |
void | addFieldToRow (long double val) |
deprecated More... | |
void | addFieldToRow (char val) |
deprecated More... | |
void | addFieldToRow (string &val) |
deprecated More... | |
void | reenter () |
continue back to calling function More... | |
bool | checkNullConstraintOK (int64_t fieldnum) |
check if NULL constraint is violated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, int64_t input) |
deprecated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, uint64_t input) |
deprecated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, bool input) |
deprecated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, long double input) |
deprecated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, char input) |
deprecated More... | |
void | makeFieldValue (fieldValue_s *val, bool isnull, string input) |
deprecated More... | |
void | reenter (int64_t res) |
continue back to calling function More... | |
void | replace () |
deprecated More... | |
void | select (int64_t tableid, int64_t fieldid, locktype_e locktype, searchParams_s *searchParameters) |
deprecated More... | |
void | continueInsertRow (int64_t entrypoint) |
deprecated More... | |
void | continueUpdateRow (int64_t entrypoint) |
deprecated More... | |
void | continueDeleteRow (int64_t entrypoint) |
deprecated More... | |
void | continueReplaceRow (int64_t entrypoint) |
deprecated More... | |
void | continueSelectRows (int64_t entrypoint) |
deprecated More... | |
void | continueFetchRows (int64_t entrypoint) |
deprecated More... | |
void | continueUnlockRow (int64_t entrypoint) |
deprecated More... | |
void | continueCommitTransaction (int64_t entrypoint) |
continuation of COMMIT More... | |
void | continueRollbackTransaction (int64_t entrypoint) |
continuation of ROLLBACK More... | |
void | rollback () |
ROLLBACK. More... | |
void | revertback (uuRecord_s &uur, enginecmd_e cmd) |
likely deprecated More... | |
void | abortCmd (int reentrystatus) |
deprecated More... | |
void | sendTransaction (enginecmd_e enginecmd, payloadtype_e payloadtype, int64_t tacmdentrypoint, int64_t engineid, void *data) |
send MessageTransaction variant to Engine More... | |
void | deadlockAbort (class MessageDeadlock &msgref) |
likely deprecated More... | |
void | updateRow () |
deprecated More... | |
void | rollback (uuRecord_s &uur) |
likely deprecated More... | |
void | revert (uuRecord_s &uur) |
likely deprecated More... | |
void | addRof (int64_t engineid, rowOrField_s &rof, boost::unordered_map< int64_t, class MessageCommitRollback * > &msgs) |
add entry (row or field) to list for Engine processing More... | |
class MessageDispatch * | makeMessageDispatch () |
create MessageDispatch for synchronous replication More... | |
void | sqlPredicate (class Statement *statement, operatortypes_e op, int64_t tableid, string &leftoperand, string &rightoperand, locktype_e locktype, vector< fieldValue_s > &inValues, void *continuationData, boost::unordered_map< uuRecord_s, returnRow_s > &results) |
SQL predicate search. More... | |
void | continueSqlPredicate (int64_t entrypoint) |
continuation of SQL predicate search More... | |
void | sqlSelectAll (class Statement *statement, int64_t tableid, locktype_e locktype, pendingprimitive_e pendingprimitive, boost::unordered_map< uuRecord_s, returnRow_s > &results) |
get all rows from a table More... | |
void | continueSqlDelete (int64_t entrypoint) |
continuation of DELETE More... | |
void | continueSqlInsert (int64_t entrypoint) |
continuation of INSERT More... | |
void | continueSqlUpdate (int64_t entrypoint) |
continuation of UPDATE More... | |
void | continueSqlReplace (int64_t entrypoint) |
continuation of REPLACE (update of field 0 in a row) More... | |
void | checkSqlLock (deadlockchange_e changetype, bool isrow, int64_t rowid, int64_t tableid, int64_t engineid, int64_t fieldid, fieldValue_s *fieldVal) |
orphan More... | |
void | commit () |
COMMIT. More... | |
int64_t | getnextpendingcmdid () |
generate unique, always incrementing id for pending command More... | |
Public Attributes | |
class TransactionAgent * | taPtr |
int64_t | transactionid |
int64_t | domainid |
class Schema * | schemaPtr |
boost::unordered_map< int64_t, int64_t > | engineToSubTransactionids |
transactionstate_e | state |
pendingprimitive_e | pendingcmd |
int64_t | pendingcmdid |
class Message * | msgrcv |
int64_t | nextpendingcmdid |
int64_t | lockcount |
int64_t | lockpendingcount |
class ApiInterface * | reentryObject |
apifPtr | reentryFuncPtr |
int64_t | reentryCmd |
void * | reentryState |
cmdState_s | currentCmdState |
int64_t | tableid |
int64_t | rowEngineid |
int64_t | resultCode |
std::vector< fieldValue_s > | fieldValues |
int64_t | enginesWithUniqueIndices |
uuRecord_s | returnNewRow |
fieldValue_s | mainFieldValue |
fieldValue_s | updateFieldValue |
std::vector< uuRecord_s > | returnselectedrows |
boost::unordered_map < uuRecord_s, stagedRow_s > | stagedRows |
boost::unordered_map< int64_t, fieldValue_s > | fieldsToUpdate |
sqlcmdstate_s | sqlcmdstate |
int | waitfordispatched |
create Transaction object
taPtrarg | TransactionAgent |
domainidarg | domainid |
Definition at line 64 of file Transaction.h.
state of Transaction, possibly an orphan
Enumerator | |
---|---|
EXPANDING | |
DISPATCHING | |
COMMITTING | |
COMMITTED | |
ABORTING | |
ABORTED |
Definition at line 127 of file Transaction.h.
Transaction::Transaction | ( | class TransactionAgent * | taPtrarg, |
int64_t | domainidarg | ||
) |
Definition at line 32 of file Transaction.cc.
References domainid, TransactionAgent::domainidsToSchemata, EXPANDING, TransactionAgent::getnexttransactionid(), lockcount, lockpendingcount, nextpendingcmdid, NOCOMMAND, pendingcmd, pendingcmdid, schemaPtr, state, taPtr, transactionid, and TransactionAgent::Transactions.
|
virtual |
Definition at line 46 of file Transaction.cc.
References taPtr, transactionid, and TransactionAgent::Transactions.
void Transaction::abortCmd | ( | int | reentrystatus) |
deprecated
reentrystatus |
Definition at line 1501 of file Transaction.cc.
References Topology::partitionAddress::address, currentCmdState, MessageDeadlock::deadlockStruct, Transaction::cmdState_s::ispossibledeadlock, TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, Transaction::cmdState_s::originaluur, reenter(), revert(), taPtr, Mboxes::toDeadlockMgr(), Message::message_s::topic, TOPIC_DEADLOCKREMOVE, MessageDeadlock::deadlock_s::transactionid, and transactionid.
Referenced by continueInsertRow(), and continueUpdateRow().
void Transaction::addFieldToRow | ( | ) |
deprecated
Definition at line 2292 of file Transaction.cc.
References fieldValues, and fieldValue_s::isnull.
Referenced by ApiInterface::addFieldToRow().
void Transaction::addFieldToRow | ( | int64_t | val) |
deprecated
Definition at line 2299 of file Transaction.cc.
References fieldValues, fieldInput_u::integer, and fieldValue_s::value.
void Transaction::addFieldToRow | ( | uint64_t | val) |
deprecated
Definition at line 2306 of file Transaction.cc.
References fieldValues, fieldInput_u::uinteger, and fieldValue_s::value.
void Transaction::addFieldToRow | ( | bool | val) |
deprecated
Definition at line 2313 of file Transaction.cc.
References fieldInput_u::boolean, fieldValues, and fieldValue_s::value.
void Transaction::addFieldToRow | ( | long double | val) |
deprecated
Definition at line 2320 of file Transaction.cc.
References fieldValues, fieldInput_u::floating, and fieldValue_s::value.
void Transaction::addFieldToRow | ( | char | val) |
deprecated
Definition at line 2327 of file Transaction.cc.
References fieldInput_u::character, fieldValues, and fieldValue_s::value.
void Transaction::addFieldToRow | ( | string & | val) |
deprecated
Definition at line 2334 of file Transaction.cc.
References fieldValues, and fieldValue_s::str.
void Transaction::addRof | ( | int64_t | engineid, |
rowOrField_s & | rof, | ||
boost::unordered_map< int64_t, class MessageCommitRollback * > & | msgs | ||
) |
add entry (row or field) to list for Engine processing
engineid | destination partitionid |
rof | entry to add |
msgs | MessageCommitRollback to add entry to |
Definition at line 2449 of file Transaction.cc.
References MessageCommitRollback::rofs.
Referenced by continueCommitTransaction().
void Transaction::badMessageHandler | ( | ) |
stub for unhandleable Message variant received
Definition at line 2286 of file Transaction.cc.
Referenced by continueSqlDelete(), and processTransactionMessage().
void Transaction::checkLock | ( | deadlockchange_e | changetype, |
bool | isrow, | ||
int64_t | rowid, | ||
int64_t | tableid, | ||
int64_t | engineid, | ||
int64_t | fieldid, | ||
fieldValue_s * | fieldValue | ||
) |
based on type of lock and other factors, intiate deadlock management
changetype | type of deadlock-affecting change event |
isrow | row or unique index |
rowid | rowid |
tableid | tableid |
engineid | engineid |
fieldid | fieldid |
fieldValue | field value |
Definition at line 953 of file Transaction.cc.
References ADDLOCKEDENTRY, ADDLOCKPENDINGENTRY, Topology::partitionAddress::address, currentCmdState, MessageDeadlock::deadlock_s::deadlockchange, MessageDeadlock::deadlockNode, MessageDeadlock::deadlockStruct, domainid, lockFieldValue_s::fieldVal, INDEXLOCK, INDEXPENDINGLOCK, TransactionAgent::instance, Transaction::cmdState_s::ispossibledeadlock, lockcount, newDeadLockLists_s::locked, lockpendingcount, lockFieldValue_s::locktype, stagedRow_s::locktype, logfile, DeadlockMgr::makeLockedItem(), TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, MessageDeadlock::nodes, pendingcmdid, PENDINGLOCK, Transaction::cmdState_s::pendingStagedRows, READLOCK, REMOVELOCKEDENTRY, REMOVELOCKPENDINGENTRY, fieldValue_s::str, MessageDeadlock::deadlock_s::tainstance, taPtr, Mboxes::toDeadlockMgr(), Message::message_s::topic, TOPIC_DEADLOCKCHANGE, TOPIC_DEADLOCKNEW, TOPIC_DEADLOCKREMOVE, MessageDeadlock::deadlock_s::transaction_pendingcmdid, MessageDeadlock::deadlock_s::transactionid, transactionid, TRANSITIONPENDINGTOLOCKEDENTRY, stagedRow_s::uniqueIndices, fieldValue_s::value, newDeadLockLists_s::waiting, and WRITELOCK.
Referenced by continueInsertRow(), continueSelectRows(), and continueUpdateRow().
bool Transaction::checkNullConstraintOK | ( | int64_t | fieldnum) |
check if NULL constraint is violated
fieldnum | true if no violation, false if violation |
Definition at line 2350 of file Transaction.cc.
References currentCmdState, Table::fields, fieldValues, NONUNIQUENOTNULL, Transaction::cmdState_s::tablePtr, UNIQUENOTNULL, and UNORDEREDNOTNULL.
Referenced by ApiInterface::insertRow(), and replace().
void Transaction::checkSqlLock | ( | deadlockchange_e | changetype, |
bool | isrow, | ||
int64_t | rowid, | ||
int64_t | tableid, | ||
int64_t | engineid, | ||
int64_t | fieldid, | ||
fieldValue_s * | fieldVal | ||
) |
orphan
changetype | |
isrow | |
rowid | |
tableid | |
engineid | |
fieldid | |
fieldVal |
Definition at line 3418 of file Transaction.cc.
References ADDLOCKEDENTRY, ADDLOCKPENDINGENTRY, Topology::partitionAddress::address, currentCmdState, MessageDeadlock::deadlock_s::deadlockchange, MessageDeadlock::deadlockNode, MessageDeadlock::deadlockStruct, domainid, lockFieldValue_s::fieldVal, INDEXLOCK, INDEXPENDINGLOCK, TransactionAgent::instance, Transaction::sqlcmdstate_s::ispossibledeadlock, Transaction::cmdState_s::ispossibledeadlock, lockcount, newDeadLockLists_s::locked, lockpendingcount, lockFieldValue_s::locktype, stagedRow_s::locktype, logfile, DeadlockMgr::makeLockedItem(), TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, MessageDeadlock::nodes, pendingcmdid, PENDINGLOCK, Transaction::cmdState_s::pendingStagedRows, READLOCK, REMOVELOCKEDENTRY, REMOVELOCKPENDINGENTRY, sqlcmdstate, fieldValue_s::str, MessageDeadlock::deadlock_s::tainstance, taPtr, Mboxes::toDeadlockMgr(), Message::message_s::topic, TOPIC_DEADLOCKCHANGE, TOPIC_DEADLOCKNEW, TOPIC_DEADLOCKREMOVE, MessageDeadlock::deadlock_s::transaction_pendingcmdid, MessageDeadlock::deadlock_s::transactionid, transactionid, TRANSITIONPENDINGTOLOCKEDENTRY, stagedRow_s::uniqueIndices, fieldValue_s::value, newDeadLockLists_s::waiting, and WRITELOCK.
void Transaction::commit | ( | ) |
COMMIT.
Definition at line 3601 of file Transaction.cc.
References Topology::partitionAddress::address, COMMIT, continueCommitTransaction(), getnextpendingcmdid(), makeMessageDispatch(), TransactionAgent::mboxes, TransactionAgent::myIdentity, TransactionAgent::myTopology, Topology::numreplicas, pendingcmd, pendingcmdid, TransactionAgent::replicaAddress, TransactionAgent::replicaAddresses, taPtr, Mboxes::toActor(), and waitfordispatched.
Referenced by ApiInterface::commit(), Pg::sqlcommitexplicit(), and Pg::sqlcommitimplicit().
void Transaction::continueCommitTransaction | ( | int64_t | entrypoint) |
continuation of COMMIT
entrypoint | entrypoint from which to continue |
Definition at line 1522 of file Transaction.cc.
References Topology::partitionAddress::address, addRof(), APISTATUS_NOTOK, APISTATUS_OK, CHARX, stagedRow_s::cmd, COMMITCMD, currentCmdState, DELETE, rowOrField_s::deleteindexentry, rowOrField_s::engineid, Transaction::cmdState_s::engines, engineToSubTransactionids, rowOrField_s::fieldid, Table::fields, rowOrField_s::fieldVal, fieldValues, getEngineid(), Field::index, Index::indextype, INSERT, rowOrField_s::isnotaddunique, fieldValue_s::isnull, rowOrField_s::isreplace, rowOrField_s::isrow, Index::isunique, logfile, TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, TransactionAgent::myTopology, rowOrField_s::newengineid, stagedRow_s::newengineid, stagedRow_s::newRow, rowOrField_s::newrowid, stagedRow_s::newrowid, NOCOMMAND, nodeTopology, NONE, Topology::numpartitions, stagedRow_s::originalengineid, stagedRow_s::originalRow, stagedRow_s::originalrowid, PAYLOADCOMMITROLLBACK, PAYLOADSUBTRANSACTION, Message::message_s::payloadtype, reenter(), Transaction::cmdState_s::replaceEngineMsgs, rowOrField_s::rowid, schemaPtr, sendTransaction(), stagedRows, fieldValue_s::str, MessageTransaction::transaction_s::subtransactionid, rowOrField_s::tableid, Schema::tables, taPtr, Mboxes::toPartition(), Message::message_s::topic, TOPIC_ENDSUBTRANSACTION, MessageTransaction::transactionStruct, trimspace(), Field::type, Table::unmakerow(), UPDATE, VARCHAR, and waitfordispatched.
Referenced by commit(), and processTransactionMessage().
void Transaction::continueDeleteRow | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 365 of file Transaction.cc.
References APISTATUS_NOTOK, APISTATUS_OK, currentCmdState, DELETE, msgrcv, Transaction::cmdState_s::originaluur, reenter(), stagedRows, MessageSubtransactionCmd::subtransaction_s::status, STATUS_OK, and MessageSubtransactionCmd::subtransactionStruct.
Referenced by processTransactionMessage().
void Transaction::continueFetchRows | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 619 of file Transaction.cc.
References logfile.
Referenced by processTransactionMessage().
void Transaction::continueInsertRow | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 221 of file Transaction.cc.
References abortCmd(), ADDLOCKEDENTRY, ADDLOCKPENDINGENTRY, APISTATUS_OK, APISTATUS_UNIQUECONSTRAINT, checkLock(), stagedRow_s::cmd, currentCmdState, indexInfo_s::engineid, Transaction::cmdState_s::engineid, MessageSubtransactionCmd::subtransaction_s::engineid, enginesWithUniqueIndices, indexInfo_s::fieldid, MessageSubtransactionCmd::subtransaction_s::fieldid, Table::fields, indexInfo_s::fieldVal, MessageSubtransactionCmd::fieldVal, fieldValues, Transaction::cmdState_s::indexEntries, INDEXLOCK, INDEXPENDINGLOCK, INSERT, indexInfo_s::isaddunique, indexInfo_s::locktype, Transaction::cmdState_s::locktype, MessageSubtransactionCmd::subtransaction_s::locktype, stagedRow_s::locktype, logfile, msgrcv, stagedRow_s::newengineid, stagedRow_s::newRow, stagedRow_s::newrowid, NOLOCK, PAYLOADSUBTRANSACTION, PENDINGTOINDEXLOCK, PENDINGTOINDEXNOLOCK, reenter(), REMOVELOCKPENDINGENTRY, returnNewRow, Transaction::cmdState_s::row, Transaction::cmdState_s::rowEngineid, Transaction::cmdState_s::rowid, MessageSubtransactionCmd::subtransaction_s::rowid, Transaction::cmdState_s::rowidsEngineids, sendTransaction(), stagedRows, MessageSubtransactionCmd::subtransactionStruct, indexInfo_s::tableid, Transaction::cmdState_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, Transaction::cmdState_s::tablePtr, TRANSITIONPENDINGTOLOCKEDENTRY, UNIQUEINDEX, and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueReplaceRow | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 1441 of file Transaction.cc.
References APISTATUS_NOTOK, continueUpdateRow(), currentCmdState, uuRecord_s::engineid, MessageSubtransactionCmd::subtransaction_s::forward_engineid, MessageSubtransactionCmd::subtransaction_s::forward_rowid, rowOrField_s::isrow, logfile, msgrcv, Transaction::cmdState_s::newuur, Transaction::cmdState_s::originaluur, PAYLOADCOMMITROLLBACK, PAYLOADSUBTRANSACTION, pendingcmd, reenter(), REPLACEDELETEROW, MessageCommitRollback::rofs, ROLLBACKCMD, uuRecord_s::rowid, rowOrField_s::rowid, MessageSubtransactionCmd::subtransaction_s::rowid, sendTransaction(), MessageSubtransactionCmd::subtransaction_s::status, STATUS_OK, MessageSubtransactionCmd::subtransactionStruct, uuRecord_s::tableid, rowOrField_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, and UPDATE.
Referenced by processTransactionMessage().
void Transaction::continueRollbackTransaction | ( | int64_t | entrypoint) |
continuation of ROLLBACK
entrypoint | entrypoint from which to continue |
Definition at line 663 of file Transaction.cc.
References logfile.
Referenced by processTransactionMessage().
void Transaction::continueSelectRows | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 382 of file Transaction.cc.
References ADDLOCKEDENTRY, ADDLOCKPENDINGENTRY, APISTATUS_OK, checkLock(), stagedRow_s::cmd, currentCmdState, nonLockingIndexEntry_s::engineid, MessageTransaction::transaction_s::engineinstance, Transaction::cmdState_s::engines, MessageSubtransactionCmd::indexHits, lockpendingcount, Transaction::cmdState_s::locktype, returnRow_s::locktype, MessageSubtransactionCmd::subtransaction_s::locktype, stagedRow_s::locktype, logfile, msgrcv, NOCOMMAND, NOLOCK, NOTFOUNDLOCK, stagedRow_s::originalengineid, stagedRow_s::originalRow, stagedRow_s::originalrowid, PAYLOADSUBTRANSACTION, PENDINGLOCK, Transaction::cmdState_s::pendingStagedRows, PENDINGTONOLOCK, PENDINGTOREADLOCK, PENDINGTOWRITELOCK, MessageTransaction::transaction_s::previoussubtransactionid, stagedRow_s::previoussubtransactionid, READLOCK, reenter(), REMOVELOCKPENDINGENTRY, MessageSubtransactionCmd::returnRows, returnselectedrows, returnRow_s::row, uuRecord_s::rowid, returnRow_s::rowid, nonLockingIndexEntry_s::rowid, MessageSubtransactionCmd::rowids, Transaction::cmdState_s::rowidsEngineids, SELECTROWS, sendTransaction(), stagedRows, MessageSubtransactionCmd::subtransactionStruct, Transaction::cmdState_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, MessageTransaction::transactionStruct, TRANSITIONPENDINGTOLOCKEDENTRY, and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueSqlDelete | ( | int64_t | entrypoint) |
continuation of DELETE
entrypoint | entry point from which to continue |
Definition at line 3085 of file Transaction.cc.
References Statement::abortQuery(), badMessageHandler(), Statement::continueDelete(), Transaction::sqlcmdstate_s::eventwaitcount, msgrcv, pendingcmdid, sqlcmdstate, Transaction::sqlcmdstate_s::statement, MessageSubtransactionCmd::subtransaction_s::status, STATUS_OK, MessageSubtransactionCmd::subtransactionStruct, MessageTransaction::transaction_s::transaction_pendingcmdid, and MessageTransaction::transactionStruct.
Referenced by processTransactionMessage().
void Transaction::continueSqlInsert | ( | int64_t | entrypoint) |
continuation of INSERT
entrypoint | entry point from which to continue |
Definition at line 3110 of file Transaction.cc.
References Statement::abortQuery(), APISTATUS_UNIQUECONSTRAINT, stagedRow_s::cmd, Statement::continueInsert(), Statement::currentQuery, uuRecord_s::engineid, MessageSubtransactionCmd::subtransaction_s::engineid, lockFieldValue_s::engineid, Transaction::sqlcmdstate_s::eventwaitcount, MessageSubtransactionCmd::subtransaction_s::fieldid, Table::fields, lockFieldValue_s::fieldVal, MessageSubtransactionCmd::fieldVal, getengine(), INDEXLOCK, INDEXPENDINGLOCK, INSERT, Statement::results_s::insertValues, MessageSubtransactionCmd::subtransaction_s::locktype, lockFieldValue_s::locktype, stagedRow_s::locktype, logfile, msgrcv, Statement::results_s::newrow, stagedRow_s::newRow, Statement::results_s::newrowengineid, stagedRow_s::newrowid, Statement::results_s::newrowuur, NOLOCK, PAYLOADSUBTRANSACTION, PENDINGTOINDEXLOCK, PENDINGTOINDEXNOLOCK, Statement::query_s::results, uuRecord_s::rowid, MessageSubtransactionCmd::subtransaction_s::rowid, schemaPtr, sendTransaction(), sqlcmdstate, stagedRows, Transaction::sqlcmdstate_s::statement, STATUS_NOTOK, MessageSubtransactionCmd::subtransactionStruct, uuRecord_s::tableid, Statement::query_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, Schema::tables, UNIQUEINDEX, stagedRow_s::uniqueIndices, and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueSqlPredicate | ( | int64_t | entrypoint) |
continuation of SQL predicate search
entrypoint | entry point from which to continue |
Definition at line 2858 of file Transaction.cc.
References Statement::abortQuery(), APISTATUS_LOCK, Transaction::sqlcmdstate_s::continuationData, Statement::continueDelete(), Statement::continueSelect(), Statement::continueUpdate(), nonLockingIndexEntry_s::engineid, MessageTransaction::transaction_s::engineinstance, Transaction::sqlcmdstate_s::eventwaitcount, Transaction::sqlcmdstate_s::indexHits, MessageSubtransactionCmd::indexHits, lockpendingcount, Transaction::sqlcmdstate_s::locktype, returnRow_s::locktype, MessageSubtransactionCmd::subtransaction_s::locktype, logfile, msgrcv, NOCOMMAND, NOLOCK, NOTFOUNDLOCK, PAYLOADSUBTRANSACTION, pendingcmd, pendingcmdid, PENDINGLOCK, PENDINGTONOLOCK, PENDINGTOREADLOCK, PENDINGTOWRITELOCK, PRIMITIVE_SQLPREDICATE, PRIMITIVE_SQLSELECTALL, PRIMITIVE_SQLSELECTALLFORDELETE, PRIMITIVE_SQLSELECTALLFORUPDATE, READLOCK, Transaction::sqlcmdstate_s::results, MessageSubtransactionCmd::returnRows, uuRecord_s::rowid, returnRow_s::rowid, nonLockingIndexEntry_s::rowid, MessageSubtransactionCmd::rowids, Statement::searchExpression(), SELECTROWS, sendTransaction(), sqlcmdstate, Transaction::sqlcmdstate_s::statement, STATUS_NOTOK, MessageSubtransactionCmd::subtransactionStruct, Transaction::sqlcmdstate_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, MessageTransaction::transactionStruct, and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueSqlReplace | ( | int64_t | entrypoint) |
continuation of REPLACE (update of field 0 in a row)
entrypoint | entry point from which to continue |
Definition at line 3286 of file Transaction.cc.
References Statement::abortQuery(), APISTATUS_UNIQUECONSTRAINT, Statement::continueUpdate(), Statement::currentQuery, MessageSubtransactionCmd::subtransaction_s::engineid, lockFieldValue_s::engineid, Transaction::sqlcmdstate_s::eventwaitcount, MessageSubtransactionCmd::subtransaction_s::fieldid, Table::fields, lockFieldValue_s::fieldVal, MessageSubtransactionCmd::fieldVal, fieldValues, MessageSubtransactionCmd::subtransaction_s::forward_engineid, MessageSubtransactionCmd::subtransaction_s::forward_rowid, getengine(), Field::index, INDEXLOCK, INDEXPENDINGLOCK, Field::indextype, MessageSubtransactionCmd::subtransaction_s::isrow, Index::isunique, MessageSubtransactionCmd::subtransaction_s::locktype, lockFieldValue_s::locktype, msgrcv, stagedRow_s::newengineid, stagedRow_s::newRow, Statement::results_s::newrowengineid, stagedRow_s::newrowid, Statement::results_s::newrowuur, NOCOMMAND, NOLOCK, NONE, stagedRow_s::originalengineid, stagedRow_s::originalrowid, Statement::results_s::originalrowuur, PAYLOADSUBTRANSACTION, pendingcmd, PENDINGTOINDEXLOCK, PENDINGTOINDEXNOLOCK, REPLACEDELETEROW, Statement::query_s::results, MessageSubtransactionCmd::subtransaction_s::rowid, schemaPtr, sendTransaction(), Statement::results_s::setFields, sqlcmdstate, stagedRows, Transaction::sqlcmdstate_s::statement, STATUS_NOTOK, MessageSubtransactionCmd::subtransactionStruct, uuRecord_s::tableid, Statement::query_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, Schema::tables, Field::type, UNIQUEINDEX, stagedRow_s::uniqueIndices, Table::unmakerow(), and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueSqlUpdate | ( | int64_t | entrypoint) |
continuation of UPDATE
entrypoint | entry point from which to continue |
Definition at line 3234 of file Transaction.cc.
References Statement::abortQuery(), APISTATUS_UNIQUECONSTRAINT, Statement::continueUpdate(), Transaction::sqlcmdstate_s::eventwaitcount, INDEXLOCK, INDEXPENDINGLOCK, MessageSubtransactionCmd::subtransaction_s::locktype, msgrcv, NOCOMMAND, NOLOCK, pendingcmd, PENDINGTOINDEXLOCK, PENDINGTOINDEXNOLOCK, sqlcmdstate, Transaction::sqlcmdstate_s::statement, STATUS_NOTOK, MessageSubtransactionCmd::subtransactionStruct, and WRITELOCK.
Referenced by processTransactionMessage().
void Transaction::continueUnlockRow | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 641 of file Transaction.cc.
References logfile.
Referenced by processTransactionMessage().
void Transaction::continueUpdateRow | ( | int64_t | entrypoint) |
deprecated
entrypoint |
Definition at line 1253 of file Transaction.cc.
References abortCmd(), ADDLOCKEDENTRY, ADDLOCKPENDINGENTRY, APISTATUS_OK, APISTATUS_UNIQUECONSTRAINT, checkLock(), stagedRow_s::cmd, currentCmdState, uuRecord_s::engineid, MessageSubtransactionCmd::subtransaction_s::engineid, lockFieldValue_s::engineid, enginesWithUniqueIndices, MessageSubtransactionCmd::subtransaction_s::fieldid, Table::fields, lockFieldValue_s::fieldVal, MessageSubtransactionCmd::fieldVal, getEngineid(), INDEXLOCK, INDEXPENDINGLOCK, fieldValue_s::isnull, MessageSubtransactionCmd::subtransaction_s::isrow, MessageSubtransactionCmd::subtransaction_s::locktype, lockFieldValue_s::locktype, logfile, msgrcv, stagedRow_s::newengineid, Transaction::cmdState_s::newFieldValues, Transaction::cmdState_s::newRow, stagedRow_s::newRow, stagedRow_s::newrowid, Transaction::cmdState_s::newuur, NOLOCK, stagedRow_s::originalengineid, Transaction::cmdState_s::originalFieldValues, stagedRow_s::originalrowid, Transaction::cmdState_s::originaluur, PAYLOADSUBTRANSACTION, Transaction::cmdState_s::pendingStagedRows, PENDINGTOINDEXLOCK, PENDINGTOINDEXNOLOCK, reenter(), revert(), MessageSubtransactionCmd::row, uuRecord_s::rowid, MessageSubtransactionCmd::subtransaction_s::rowid, sendTransaction(), stagedRows, MessageSubtransactionCmd::subtransaction_s::status, STATUS_OK, fieldValue_s::str, MessageSubtransactionCmd::subtransactionStruct, uuRecord_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, tableid, Transaction::cmdState_s::tablePtr, TRANSITIONPENDINGTOLOCKEDENTRY, UNIQUEINDEX, Transaction::cmdState_s::uniqueindices, stagedRow_s::uniqueIndices, UPDATE, UPDATEROW, and fieldValue_s::value.
Referenced by continueReplaceRow(), processTransactionMessage(), and updateRow().
void Transaction::deadlockAbort | ( | class MessageDeadlock & | msgref) |
likely deprecated
msgref |
Definition at line 911 of file Transaction.cc.
References APISTATUS_DEADLOCK, currentCmdState, MessageDeadlock::deadlockStruct, rowOrField_s::isrow, PAYLOADCOMMITROLLBACK, pendingcmdid, Transaction::cmdState_s::pendingStagedRows, reenter(), MessageCommitRollback::rofs, ROLLBACKCMD, rowOrField_s::rowid, sendTransaction(), rowOrField_s::tableid, tableid, and MessageDeadlock::deadlock_s::transaction_pendingcmdid.
void Transaction::dispatch | ( | class Message * | msgrcv) |
orphan, never implemented so far, stub
msgrcv |
Definition at line 213 of file Transaction.cc.
void Transaction::dispatched | ( | class Message * | msgrcv) |
orphan, never implemented so far, stub
msgrcv |
Definition at line 217 of file Transaction.cc.
int64_t Transaction::getengine | ( | fieldtype_e | fieldtype, |
fieldValue_s & | fieldValue | ||
) |
get engine/partitionid based on hash of input
fieldtype | field type |
fieldValue | input value |
Definition at line 51 of file Transaction.cc.
References BOOL, fieldInput_u::boolean, CHAR, fieldInput_u::character, CHARX, FLOAT, fieldInput_u::floating, SpookyHash::Hash64(), INT, fieldInput_u::integer, logfile, nodeTopology, Topology::numpartitions, fieldValue_s::str, trimspace(), UINT, fieldInput_u::uinteger, fieldValue_s::value, and VARCHAR.
Referenced by Statement::branchtotype(), continueSqlInsert(), continueSqlReplace(), and Statement::continueUpdate().
int64_t Transaction::getEngineid | ( | class Table * | tablePtr, |
int64_t | fieldnum | ||
) |
get engineid/partitionid based on hash of this fieldValues
tablePtr | Table |
fieldnum | fieldid |
Definition at line 106 of file Transaction.cc.
References BOOL, CHAR, CHARX, Table::fields, fieldValues, FLOAT, SpookyHash::Hash64(), INT, logfile, nodeTopology, Topology::numpartitions, UINT, and VARCHAR.
Referenced by continueCommitTransaction(), continueUpdateRow(), ApiInterface::insertRow(), replace(), select(), and sqlPredicate().
int64_t Transaction::getEngineid | ( | class Table * | tablePtr, |
int64_t | fieldid, | ||
fieldValue_s * | val | ||
) |
get engine/partitionid based on hash of input
tablePtr | Table |
fieldid | fieldid |
val | input value |
Definition at line 161 of file Transaction.cc.
References BOOL, fieldInput_u::boolean, CHAR, fieldInput_u::character, CHARX, Table::fields, FLOAT, fieldInput_u::floating, SpookyHash::Hash64(), INT, fieldInput_u::integer, logfile, nodeTopology, Topology::numpartitions, fieldValue_s::str, UINT, fieldInput_u::uinteger, fieldValue_s::value, and VARCHAR.
int64_t Transaction::getEngineid | ( | int64_t | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2249 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, and Topology::numpartitions.
int64_t Transaction::getEngineid | ( | uint64_t | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2255 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, and Topology::numpartitions.
int64_t Transaction::getEngineid | ( | bool | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2261 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, and Topology::numpartitions.
int64_t Transaction::getEngineid | ( | long double | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2267 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, and Topology::numpartitions.
int64_t Transaction::getEngineid | ( | char | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2273 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, and Topology::numpartitions.
int64_t Transaction::getEngineid | ( | string * | input) |
get engine/partitionid based on hash of input
input | input value |
Definition at line 2279 of file Transaction.cc.
References SpookyHash::Hash64(), nodeTopology, Topology::numpartitions, and trimspace().
int64_t Transaction::getnextpendingcmdid | ( | ) |
generate unique, always incrementing id for pending command
Definition at line 2461 of file Transaction.cc.
References nextpendingcmdid.
Referenced by Statement::branchtotype(), commit(), Statement::continueDelete(), Statement::continueUpdate(), ApiInterface::deleteRow(), ApiInterface::fetchRows(), ApiInterface::insertRow(), ApiInterface::replaceRow(), select(), sqlPredicate(), sqlSelectAll(), ApiInterface::unlock(), and updateRow().
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
int64_t | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2366 of file Transaction.cc.
References fieldInput_u::integer, fieldValue_s::isnull, and fieldValue_s::value.
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
uint64_t | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2378 of file Transaction.cc.
References fieldValue_s::isnull, fieldInput_u::uinteger, and fieldValue_s::value.
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
bool | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2390 of file Transaction.cc.
References fieldInput_u::boolean, fieldValue_s::isnull, and fieldValue_s::value.
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
long double | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2402 of file Transaction.cc.
References fieldInput_u::floating, fieldValue_s::isnull, and fieldValue_s::value.
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
char | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2414 of file Transaction.cc.
References fieldInput_u::character, fieldValue_s::isnull, and fieldValue_s::value.
void Transaction::makeFieldValue | ( | fieldValue_s * | val, |
bool | isnull, | ||
string | input | ||
) |
deprecated
val | |
isnull | |
input |
Definition at line 2426 of file Transaction.cc.
References fieldValue_s::isnull, and fieldValue_s::str.
class MessageDispatch * Transaction::makeMessageDispatch | ( | ) |
create MessageDispatch for synchronous replication
Definition at line 2466 of file Transaction.cc.
References stagedRow_s::cmd, DELETE, MessageDispatch::dispatchStruct, MessageDispatch::dispatch_s::domainid, domainid, uuRecord_s::engineid, engineToSubTransactionids, INSERT, stagedRow_s::newRow, stagedRow_s::newrowid, MessageDispatch::record_s::oldrow, stagedRow_s::originalRow, stagedRow_s::originalrowid, MessageDispatch::pidsids, stagedRow_s::previoussubtransactionid, MessageDispatch::record_s::previoussubtransactionid, MessageDispatch::record_s::primitive, MessageDispatch::records, MessageDispatch::record_s::row, MessageDispatch::record_s::rowid, stagedRows, uuRecord_s::tableid, MessageDispatch::record_s::tableid, MessageDispatch::dispatch_s::transactionid, transactionid, and UPDATE.
Referenced by commit().
void Transaction::processTransactionMessage | ( | class Message * | msgrcvarg) |
execute continuation based on MessageTransaction reply
msgrcvarg | MessageTransaction variant received |
Definition at line 715 of file Transaction.cc.
References badMessageHandler(), COMMIT, continueCommitTransaction(), continueDeleteRow(), continueFetchRows(), continueInsertRow(), continueReplaceRow(), continueRollbackTransaction(), continueSelectRows(), continueSqlDelete(), continueSqlInsert(), continueSqlPredicate(), continueSqlReplace(), continueSqlUpdate(), continueUnlockRow(), continueUpdateRow(), DELETE, MessageTransaction::transaction_s::engineinstance, engineToSubTransactionids, FETCH, INSERT, logfile, msgrcv, NOCOMMAND, pendingcmd, pendingcmdid, PRIMITIVE_SQLDELETE, PRIMITIVE_SQLINSERT, PRIMITIVE_SQLPREDICATE, PRIMITIVE_SQLREPLACE, PRIMITIVE_SQLSELECTALL, PRIMITIVE_SQLSELECTALLFORDELETE, PRIMITIVE_SQLSELECTALLFORUPDATE, PRIMITIVE_SQLUPDATE, REPLACE, ROLLBACK, SELECT, MessageTransaction::transaction_s::subtransactionid, MessageTransaction::transaction_s::transaction_pendingcmdid, MessageTransaction::transaction_s::transaction_tacmdentrypoint, MessageTransaction::transactionStruct, UNLOCK, and UPDATE.
void Transaction::reenter | ( | ) |
continue back to calling function
Definition at line 2341 of file Transaction.cc.
References NOCOMMAND, pendingcmd, pendingcmdid, reentryCmd, reentryFuncPtr, reentryObject, and reentryState.
Referenced by abortCmd(), ApiInterface::bouncebackproxy(), ApiInterface::commit(), continueCommitTransaction(), continueDeleteRow(), continueInsertRow(), continueReplaceRow(), continueSelectRows(), continueUpdateRow(), deadlockAbort(), ApiInterface::deleteRow(), ApiInterface::fetchRows(), ApiInterface::insertRow(), replace(), ApiInterface::replaceRow(), ApiInterface::revert(), rollback(), ApiInterface::rollback(), select(), ApiInterface::selectRows(), ApiInterface::unlock(), and updateRow().
void Transaction::reenter | ( | int64_t | res) |
continue back to calling function
reentry | status |
Definition at line 2212 of file Transaction.cc.
References NOCOMMAND, pendingcmd, pendingcmdid, reentryCmd, reentryFuncPtr, reentryObject, reentryState, and resultCode.
void Transaction::replace | ( | ) |
deprecated
Definition at line 1226 of file Transaction.cc.
References APISTATUS_NULLCONSTRAINT, checkNullConstraintOK(), currentCmdState, uuRecord_s::engineid, getEngineid(), Transaction::cmdState_s::newFieldValues, Transaction::cmdState_s::newRow, NEWROW, Transaction::cmdState_s::newuur, Transaction::cmdState_s::originaluur, PAYLOADSUBTRANSACTION, reenter(), MessageSubtransactionCmd::row, sendTransaction(), MessageSubtransactionCmd::subtransactionStruct, uuRecord_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, and Transaction::cmdState_s::tablePtr.
Referenced by updateRow().
void Transaction::revert | ( | uuRecord_s & | uur) |
likely deprecated
uur |
Definition at line 2444 of file Transaction.cc.
References revertback(), and REVERTCMD.
Referenced by abortCmd(), continueUpdateRow(), and ApiInterface::revert().
void Transaction::revertback | ( | uuRecord_s & | uur, |
enginecmd_e | cmd | ||
) |
likely deprecated
uur | |
cmd |
Definition at line 2162 of file Transaction.cc.
References stagedRow_s::cmd, uuRecord_s::engineid, rowOrField_s::fieldid, rowOrField_s::fieldVal, rowOrField_s::isnotaddunique, rowOrField_s::isreplace, rowOrField_s::isrow, stagedRow_s::newengineid, stagedRow_s::newrowid, PAYLOADCOMMITROLLBACK, MessageCommitRollback::rofs, ROLLBACKCMD, uuRecord_s::rowid, rowOrField_s::rowid, sendTransaction(), stagedRows, uuRecord_s::tableid, rowOrField_s::tableid, stagedRow_s::uniqueIndices, and UPDATE.
Referenced by revert(), and rollback().
void Transaction::rollback | ( | ) |
ROLLBACK.
Definition at line 2086 of file Transaction.cc.
References Topology::partitionAddress::address, APISTATUS_OK, stagedRow_s::cmd, engineToSubTransactionids, rowOrField_s::fieldid, rowOrField_s::fieldVal, rowOrField_s::isnotaddunique, rowOrField_s::isreplace, rowOrField_s::isrow, TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, stagedRow_s::newengineid, stagedRow_s::newrowid, PAYLOADCOMMITROLLBACK, PAYLOADSUBTRANSACTION, Message::message_s::payloadtype, reenter(), MessageCommitRollback::rofs, ROLLBACKCMD, rowOrField_s::rowid, sendTransaction(), stagedRows, MessageTransaction::transaction_s::subtransactionid, rowOrField_s::tableid, taPtr, Mboxes::toPartition(), Message::message_s::topic, TOPIC_ENDSUBTRANSACTION, MessageTransaction::transactionStruct, and UPDATE.
Referenced by Pg::closesocket(), ApiInterface::rollback(), Pg::sqlrollbackexplicit(), and Pg::sqlrollbackimplicit().
void Transaction::rollback | ( | uuRecord_s & | uur) |
likely deprecated
uur |
Definition at line 2438 of file Transaction.cc.
References APISTATUS_OK, reenter(), revertback(), and ROLLBACKCMD.
void Transaction::select | ( | int64_t | tableid, |
int64_t | fieldid, | ||
locktype_e | locktype, | ||
searchParams_s * | searchParameters | ||
) |
deprecated
tableid | |
fieldid | |
locktype | |
searchParameters |
Definition at line 817 of file Transaction.cc.
References APISTATUS_PENDING, BOOL, CHAR, CHARX, currentCmdState, Transaction::cmdState_s::engines, Transaction::cmdState_s::fieldid, MessageSubtransactionCmd::subtransaction_s::fieldid, FLOAT, getEngineid(), getnextpendingcmdid(), INDEXSEARCH, INT, Transaction::cmdState_s::ispossibledeadlock, Transaction::cmdState_s::locktype, logfile, NOCOMMAND, nodeTopology, Topology::numpartitions, searchParams_s::op, OPERATOR_EQ, PAYLOADSUBTRANSACTION, pendingcmd, pendingcmdid, reenter(), Transaction::cmdState_s::rowidsEngineids, schemaPtr, MessageSubtransactionCmd::searchParameters, SELECT, sendTransaction(), MessageSubtransactionCmd::subtransactionStruct, Transaction::cmdState_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, tableid, Schema::tables, UINT, searchParams_s::values, and VARCHAR.
Referenced by ApiInterface::selectRows().
void Transaction::sendTransaction | ( | enginecmd_e | enginecmd, |
payloadtype_e | payloadtype, | ||
int64_t | tacmdentrypoint, | ||
int64_t | engineid, | ||
void * | data | ||
) |
send MessageTransaction variant to Engine
enginecmd | command to execute |
payloadtype | MessageTransaction variant |
tacmdentrypoint | return function continuation entry point |
engineid | destination partitionid |
data | MessageTransaction variant |
Definition at line 684 of file Transaction.cc.
References Topology::partitionAddress::address, MessageTransaction::transaction_s::domainid, domainid, engineToSubTransactionids, TransactionAgent::instance, TransactionAgent::mboxes, Message::messageStruct, TransactionAgent::myIdentity, Message::message_s::payloadtype, payloadtype, pendingcmdid, MessageTransaction::transaction_s::subtransactionid, MessageTransaction::transaction_s::tainstance, taPtr, Mboxes::toPartition(), Message::message_s::topic, TOPIC_TRANSACTION, MessageTransaction::transaction_s::transaction_enginecmd, MessageTransaction::transaction_s::transaction_pendingcmdid, MessageTransaction::transaction_s::transaction_tacmdentrypoint, MessageTransaction::transaction_s::transactionid, transactionid, and MessageTransaction::transactionStruct.
Referenced by Statement::branchtotype(), continueCommitTransaction(), Statement::continueDelete(), continueInsertRow(), continueReplaceRow(), continueSelectRows(), continueSqlInsert(), continueSqlPredicate(), continueSqlReplace(), Statement::continueUpdate(), continueUpdateRow(), deadlockAbort(), ApiInterface::deleteRow(), Ast::evaluate(), ApiInterface::insertRow(), replace(), revertback(), rollback(), select(), sqlPredicate(), and sqlSelectAll().
void Transaction::sqlPredicate | ( | class Statement * | statement, |
operatortypes_e | op, | ||
int64_t | tableid, | ||
string & | leftoperand, | ||
string & | rightoperand, | ||
locktype_e | locktype, | ||
vector< fieldValue_s > & | inValues, | ||
void * | continuationData, | ||
boost::unordered_map< uuRecord_s, returnRow_s > & | results | ||
) |
SQL predicate search.
statement | Statment |
op | predicate operator type |
tableid | tableid |
leftoperand | left operand of operation |
rightoperand | right operand of operation |
locktype | lock type |
inValues | if IN (or NOT IN), list of values to check |
continuationData | data to pass to continuation function |
results | results of search |
Definition at line 2516 of file Transaction.cc.
References BOOL, CHAR, CHARX, Transaction::sqlcmdstate_s::continuationData, Transaction::sqlcmdstate_s::eventwaitcount, MessageSubtransactionCmd::subtransaction_s::fieldid, FLOAT, getEngineid(), getnextpendingcmdid(), INDEXSEARCH, INT, Transaction::sqlcmdstate_s::locktype, MessageSubtransactionCmd::subtransaction_s::locktype, NOCOMMAND, nodeTopology, Topology::numpartitions, searchParams_s::op, OPERAND_BOOLEAN, OPERAND_FIELDID, OPERAND_FLOAT, OPERAND_IDENTIFIER, OPERAND_INTEGER, OPERAND_STRING, OPERATOR_BETWEEN, OPERATOR_EQ, OPERATOR_IN, OPERATOR_ISNOTNULL, OPERATOR_ISNULL, OPERATOR_NOTBETWEEN, OPERATOR_NOTIN, PAYLOADSUBTRANSACTION, pendingcmd, pendingcmdid, PRIMITIVE_SQLPREDICATE, Transaction::sqlcmdstate_s::results, schemaPtr, Statement::searchExpression(), MessageSubtransactionCmd::searchParameters, SEARCHRETURN1, sendTransaction(), sqlcmdstate, Transaction::sqlcmdstate_s::statement, MessageSubtransactionCmd::subtransactionStruct, Transaction::sqlcmdstate_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, tableid, Schema::tables, Field::type, UINT, searchParams_s::values, and VARCHAR.
Referenced by Ast::evaluate().
void Transaction::sqlSelectAll | ( | class Statement * | statement, |
int64_t | tableid, | ||
locktype_e | locktype, | ||
pendingprimitive_e | pendingprimitive, | ||
boost::unordered_map< uuRecord_s, returnRow_s > & | results | ||
) |
get all rows from a table
statement | Statement |
tableid | tableid |
locktype | lock type |
pendingprimitive | type of query (SELECT|UPDATE|DELETE) |
results | result rows |
Definition at line 3044 of file Transaction.cc.
References Statement::continueSelect(), Transaction::sqlcmdstate_s::eventwaitcount, MessageSubtransactionCmd::subtransaction_s::fieldid, getnextpendingcmdid(), INDEXSEARCH, Transaction::sqlcmdstate_s::locktype, MessageSubtransactionCmd::subtransaction_s::locktype, NOCOMMAND, nodeTopology, Topology::numpartitions, searchParams_s::op, OPERATOR_SELECTALL, PAYLOADSUBTRANSACTION, pendingcmd, pendingcmdid, Transaction::sqlcmdstate_s::results, MessageSubtransactionCmd::searchParameters, sendTransaction(), sqlcmdstate, Transaction::sqlcmdstate_s::statement, MessageSubtransactionCmd::subtransactionStruct, Transaction::sqlcmdstate_s::tableid, MessageSubtransactionCmd::subtransaction_s::tableid, and tableid.
Referenced by Statement::branchtotype().
void Transaction::updateRow | ( | ) |
deprecated
Definition at line 1137 of file Transaction.cc.
References APISTATUS_FIELD, APISTATUS_NOTOK, continueUpdateRow(), currentCmdState, Transaction::cmdState_s::fieldid, fieldsToUpdate, Transaction::cmdState_s::fieldVal, getnextpendingcmdid(), Transaction::cmdState_s::isupdatemultiplefields, Table::makerow(), Transaction::cmdState_s::newFieldValues, Transaction::cmdState_s::newRow, Transaction::cmdState_s::newuur, NOCOMMAND, Transaction::cmdState_s::originalFieldValues, Transaction::cmdState_s::originaluur, pendingcmd, pendingcmdid, reenter(), REPLACE, replace(), schemaPtr, stagedRows, uuRecord_s::tableid, Transaction::cmdState_s::tablePtr, Schema::tables, Table::unmakerow(), UPDATE, and WRITELOCK.
Referenced by ApiInterface::updateRow(), and ApiInterface::updateRowNullField().
void Transaction::zeroCurrentCmdState | ( | ) |
clear current command state
Definition at line 2227 of file Transaction.cc.
References currentCmdState, Transaction::cmdState_s::destinationengineid, Transaction::cmdState_s::engineid, Transaction::cmdState_s::engines, Transaction::cmdState_s::enginesWithUniqueIndices, Transaction::cmdState_s::fieldid, Transaction::cmdState_s::fieldVal, Transaction::cmdState_s::indexEntries, fieldValue_s::isnull, Transaction::cmdState_s::isunique, Transaction::cmdState_s::locktype, NOLOCK, Transaction::cmdState_s::row, Transaction::cmdState_s::rowEngineid, Transaction::cmdState_s::rowid, Transaction::cmdState_s::rowPtr, fieldValue_s::str, Transaction::cmdState_s::tableid, Transaction::cmdState_s::tablePtr, and fieldValue_s::value.
Referenced by ApiInterface::deleteRow(), and ApiInterface::insertRow().
cmdState_s Transaction::currentCmdState |
Definition at line 612 of file Transaction.h.
Referenced by abortCmd(), checkLock(), checkNullConstraintOK(), checkSqlLock(), continueCommitTransaction(), continueDeleteRow(), continueInsertRow(), continueReplaceRow(), continueSelectRows(), continueUpdateRow(), deadlockAbort(), ApiInterface::deleteRow(), ApiInterface::insertRow(), replace(), select(), updateRow(), ApiInterface::updateRow(), ApiInterface::updateRowNullField(), and zeroCurrentCmdState().
int64_t Transaction::domainid |
Definition at line 593 of file Transaction.h.
Referenced by checkLock(), checkSqlLock(), makeMessageDispatch(), sendTransaction(), and Transaction().
int64_t Transaction::enginesWithUniqueIndices |
Definition at line 619 of file Transaction.h.
Referenced by continueInsertRow(), and continueUpdateRow().
boost::unordered_map<int64_t, int64_t> Transaction::engineToSubTransactionids |
Definition at line 595 of file Transaction.h.
Referenced by continueCommitTransaction(), makeMessageDispatch(), processTransactionMessage(), rollback(), and sendTransaction().
boost::unordered_map< int64_t, fieldValue_s > Transaction::fieldsToUpdate |
Definition at line 635 of file Transaction.h.
Referenced by updateRow().
std::vector<fieldValue_s> Transaction::fieldValues |
Definition at line 618 of file Transaction.h.
Referenced by addFieldToRow(), checkNullConstraintOK(), continueCommitTransaction(), continueInsertRow(), continueSqlReplace(), getEngineid(), ApiInterface::insertRow(), and Pg::putDataRows().
int64_t Transaction::lockcount |
Definition at line 602 of file Transaction.h.
Referenced by checkLock(), checkSqlLock(), and Transaction().
int64_t Transaction::lockpendingcount |
Definition at line 603 of file Transaction.h.
Referenced by checkLock(), checkSqlLock(), continueSelectRows(), continueSqlPredicate(), and Transaction().
fieldValue_s Transaction::mainFieldValue |
Definition at line 626 of file Transaction.h.
class Message* Transaction::msgrcv |
Definition at line 599 of file Transaction.h.
Referenced by continueDeleteRow(), continueInsertRow(), continueReplaceRow(), continueSelectRows(), continueSqlDelete(), continueSqlInsert(), continueSqlPredicate(), continueSqlReplace(), continueSqlUpdate(), continueUpdateRow(), and processTransactionMessage().
int64_t Transaction::nextpendingcmdid |
Definition at line 600 of file Transaction.h.
Referenced by getnextpendingcmdid(), and Transaction().
pendingprimitive_e Transaction::pendingcmd |
Definition at line 597 of file Transaction.h.
Referenced by Statement::branchtotype(), ApiInterface::commit(), commit(), Statement::continueDelete(), continueReplaceRow(), continueSqlPredicate(), continueSqlReplace(), continueSqlUpdate(), Statement::continueUpdate(), ApiInterface::deleteRow(), ApiInterface::fetchRows(), ApiInterface::insertRow(), processTransactionMessage(), reenter(), Statement::reenter(), ApiInterface::replaceRow(), ApiInterface::revert(), ApiInterface::rollback(), select(), sqlPredicate(), sqlSelectAll(), Transaction(), ApiInterface::unlock(), and updateRow().
int64_t Transaction::pendingcmdid |
Definition at line 598 of file Transaction.h.
Referenced by Statement::branchtotype(), checkLock(), checkSqlLock(), commit(), Statement::continueDelete(), continueSqlDelete(), continueSqlPredicate(), Statement::continueUpdate(), deadlockAbort(), ApiInterface::deleteRow(), ApiInterface::fetchRows(), ApiInterface::insertRow(), processTransactionMessage(), reenter(), Statement::reenter(), ApiInterface::replaceRow(), select(), sendTransaction(), sqlPredicate(), sqlSelectAll(), Transaction(), ApiInterface::unlock(), and updateRow().
int64_t Transaction::reentryCmd |
Definition at line 608 of file Transaction.h.
Referenced by Pg::closesocket(), reenter(), ApiInterface::setReEntry(), Pg::sqlcommitexplicit(), Pg::sqlcommitimplicit(), Pg::sqlrollbackexplicit(), and Pg::sqlrollbackimplicit().
apifPtr Transaction::reentryFuncPtr |
Definition at line 607 of file Transaction.h.
Referenced by Pg::closesocket(), reenter(), ApiInterface::setReEntry(), Pg::sqlcommitexplicit(), Pg::sqlcommitimplicit(), Pg::sqlrollbackexplicit(), and Pg::sqlrollbackimplicit().
class ApiInterface* Transaction::reentryObject |
Definition at line 606 of file Transaction.h.
Referenced by Pg::closesocket(), reenter(), ApiInterface::setReEntry(), Pg::sqlcommitexplicit(), Pg::sqlcommitimplicit(), Pg::sqlrollbackexplicit(), and Pg::sqlrollbackimplicit().
void* Transaction::reentryState |
Definition at line 609 of file Transaction.h.
Referenced by Pg::closesocket(), reenter(), ApiInterface::setReEntry(), Pg::sqlcommitexplicit(), Pg::sqlcommitimplicit(), Pg::sqlrollbackexplicit(), and Pg::sqlrollbackimplicit().
int64_t Transaction::resultCode |
Definition at line 616 of file Transaction.h.
Referenced by ApiInterface::getResultCode(), and reenter().
uuRecord_s Transaction::returnNewRow |
Definition at line 622 of file Transaction.h.
Referenced by continueInsertRow(), and ApiInterface::insertRow().
std::vector< uuRecord_s > Transaction::returnselectedrows |
Definition at line 633 of file Transaction.h.
Referenced by continueSelectRows().
int64_t Transaction::rowEngineid |
Definition at line 614 of file Transaction.h.
class Schema* Transaction::schemaPtr |
Definition at line 594 of file Transaction.h.
Referenced by continueCommitTransaction(), continueSqlInsert(), continueSqlReplace(), ApiInterface::insertRow(), select(), sqlPredicate(), Transaction(), ApiInterface::unmakerow(), and updateRow().
sqlcmdstate_s Transaction::sqlcmdstate |
Definition at line 637 of file Transaction.h.
Referenced by Statement::branchtotype(), checkSqlLock(), Statement::continueDelete(), continueSqlDelete(), continueSqlInsert(), continueSqlPredicate(), continueSqlReplace(), continueSqlUpdate(), Statement::continueUpdate(), sqlPredicate(), and sqlSelectAll().
boost::unordered_map< uuRecord_s, stagedRow_s > Transaction::stagedRows |
Definition at line 634 of file Transaction.h.
Referenced by Statement::branchtotype(), continueCommitTransaction(), Statement::continueDelete(), continueDeleteRow(), continueInsertRow(), Statement::continueSelect(), continueSelectRows(), continueSqlInsert(), continueSqlReplace(), Statement::continueUpdate(), continueUpdateRow(), ApiInterface::deleteRow(), Ast::evaluate(), makeMessageDispatch(), revertback(), rollback(), and updateRow().
transactionstate_e Transaction::state |
Definition at line 596 of file Transaction.h.
Referenced by Transaction().
int64_t Transaction::tableid |
Definition at line 613 of file Transaction.h.
Referenced by continueUpdateRow(), deadlockAbort(), ApiInterface::insertRow(), select(), sqlPredicate(), and sqlSelectAll().
class TransactionAgent* Transaction::taPtr |
Definition at line 591 of file Transaction.h.
Referenced by abortCmd(), checkLock(), checkSqlLock(), commit(), continueCommitTransaction(), rollback(), sendTransaction(), Transaction(), and ~Transaction().
int64_t Transaction::transactionid |
Definition at line 592 of file Transaction.h.
Referenced by abortCmd(), checkLock(), checkSqlLock(), makeMessageDispatch(), sendTransaction(), Transaction(), and ~Transaction().
fieldValue_s Transaction::updateFieldValue |
Definition at line 627 of file Transaction.h.
int Transaction::waitfordispatched |
Definition at line 639 of file Transaction.h.
Referenced by commit(), and continueCommitTransaction().