mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
added config parameter Group on connection
moved NdbWaiter, m_ndb_cluster_connection, to impl class moved node selection things to cluster connection moved all private things to impl class added opts for shared memory and node selection changed opts handling somewhat; introduced enum for options and common handling of option variables added checks for transporter support automatic addition of shared mem transporters moved wait_until_ready code to cluster connection added control of usage of new node selection method ndb/include/mgmapi/mgmapi_config_parameters.h: added config parameter Group on connection ndb/include/ndbapi/Ndb.hpp: moved NdbWaiter, m_ndb_cluster_connection, to impl class moved node selection things to cluster connection ndb/include/ndbapi/ndb_cluster_connection.hpp: moved all private things to impl class ndb/include/util/ndb_opts.h: added opts for shared memory and node selection ndb/src/kernel/vm/Configuration.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/mgmclient/main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/mgmsrv/ConfigInfo.cpp: added checks for transporter support automatic addition of shared mem transporters ndb/src/mgmsrv/MgmtSrvr.cpp: in alloc node id first choose connection with specified hostname ndb/src/mgmsrv/main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/src/ndbapi/DictCache.hpp: added include file ndb/src/ndbapi/Ndb.cpp: enabled using new node selection method moved wait_until_ready code to cluster connection moved node selection (hint) to cluster connection removed start transaction dgroup ndb/src/ndbapi/NdbDictionaryImpl.hpp: removed and added inclusde files ndb/src/ndbapi/NdbImpl.hpp: moved things from Ndb into Impl class moved waiter things to new file NdbWaiter.hpp ndb/src/ndbapi/NdbScanOperation.cpp: ndbwaiter is no in impl class ndb/src/ndbapi/Ndbif.cpp: ndbwaiter is no in impl class ndb/src/ndbapi/Ndbinit.cpp: moved some Ndb things into impl class ndb/src/ndbapi/TransporterFacade.hpp: changed friend declaration ndb/src/ndbapi/ndb_cluster_connection.cpp: moved node selection things to cluster connection moved things from cluster connection to cluster connection impl class ndb/test/ndbapi/testNdbApi.cpp: removed start transaction dgroup ndb/tools/delete_all.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/desc.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/drop_index.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/drop_tab.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/listTables.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/restore/restore_main.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/select_all.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/select_count.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables ndb/tools/waiter.cpp: changed opts handling somewhat; introduced enum for options and common handling of option variables sql/ha_ndbcluster.cc: added control of usage of new node selection method sql/mysqld.cc: added control of usage of new node selection method
This commit is contained in:
@ -901,23 +901,6 @@ typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
|
||||
NDB_MAX_SCHEMA_NAME_SIZE + \
|
||||
NDB_MAX_TAB_NAME_SIZE*2
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
|
||||
class NdbWaiter {
|
||||
public:
|
||||
NdbWaiter();
|
||||
~NdbWaiter();
|
||||
|
||||
void wait(int waitTime);
|
||||
void nodeFail(Uint32 node);
|
||||
void signal(Uint32 state);
|
||||
|
||||
Uint32 m_node;
|
||||
Uint32 m_state;
|
||||
void * m_mutex;
|
||||
struct NdbCondition * m_condition;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @class Ndb
|
||||
* @brief Represents the NDB kernel and is the main class of the NDB API.
|
||||
@ -1199,39 +1182,6 @@ public:
|
||||
const char * keyData = 0,
|
||||
Uint32 keyLen = 0);
|
||||
|
||||
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
|
||||
/**
|
||||
* This method is a modification of Ndb::startTransaction,
|
||||
* in which we use only the first two chars of keyData to
|
||||
* select transaction coordinator.
|
||||
* This is referred to as a distribution group.
|
||||
* There are two ways to use the method:
|
||||
* - In the first, the two characters are used directly as
|
||||
* the distribution key, and
|
||||
* - in the second the distribution is calculated as:
|
||||
* (10 * (char[0] - 0x30) + (char[1] - 0x30)).
|
||||
* Thus, in the second way, the two ASCII digits '78'
|
||||
* will provide the distribution key = 78.
|
||||
*
|
||||
* @note Transaction priorities are not yet supported.
|
||||
*
|
||||
* @param aPrio Priority of the transaction.<br>
|
||||
* Priority 0 is the highest priority and is used for short transactions
|
||||
* with requirements on low delay.<br>
|
||||
* Priority 1 is a medium priority for short transactions.<br>
|
||||
* Priority 2 is a medium priority for long transactions.<br>
|
||||
* Priority 3 is a low priority for long transactions.
|
||||
* @param keyData is a string of which the two first characters
|
||||
* is used to compute which fragement the data is stored in.
|
||||
* @param type is the type of distribution group.<br>
|
||||
* 0 means direct usage of the two characters, and<br>
|
||||
* 1 means the ASCII digit variant.
|
||||
* @return NdbConnection, or NULL if it failed.
|
||||
*/
|
||||
NdbConnection* startTransactionDGroup(Uint32 aPrio,
|
||||
const char * keyData, int type);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* When a transactions is completed, the transaction has to be closed.
|
||||
*
|
||||
@ -1586,8 +1536,6 @@ private:
|
||||
/******************************************************************************
|
||||
* These are the private variables in this class.
|
||||
*****************************************************************************/
|
||||
Ndb_cluster_connection *m_ndb_cluster_connection;
|
||||
|
||||
NdbConnection** thePreparedTransactionsArray;
|
||||
NdbConnection** theSentTransactionsArray;
|
||||
NdbConnection** theCompletedTransactionsArray;
|
||||
@ -1601,8 +1549,6 @@ private:
|
||||
|
||||
Uint32 theNextConnectNode;
|
||||
|
||||
NdbWaiter theWaiter;
|
||||
|
||||
bool fullyQualifiedNames;
|
||||
|
||||
// Ndb database name.
|
||||
@ -1658,35 +1604,6 @@ private:
|
||||
InitConfigError
|
||||
} theInitState;
|
||||
|
||||
/**
|
||||
* Computes fragement id for primary key
|
||||
*
|
||||
* Note that keydata has to be "shaped" as it is being sent in KEYINFO
|
||||
*/
|
||||
Uint32 computeFragmentId(const char * keyData, Uint32 keyLen);
|
||||
Uint32 getFragmentId(Uint32 hashValue);
|
||||
|
||||
/**
|
||||
* Make a guess to which node is the primary for the fragment
|
||||
*/
|
||||
Uint32 guessPrimaryNode(Uint32 fragmentId);
|
||||
|
||||
/**
|
||||
* Structure containing values for guessing primary node
|
||||
*/
|
||||
struct StartTransactionNodeSelectionData {
|
||||
StartTransactionNodeSelectionData():
|
||||
fragment2PrimaryNodeMap(0) {};
|
||||
Uint32 kValue;
|
||||
Uint32 hashValueMask;
|
||||
Uint32 hashpointerValue;
|
||||
Uint32 noOfFragments;
|
||||
Uint32 * fragment2PrimaryNodeMap;
|
||||
|
||||
void init(Uint32 noOfNodes, Uint8 nodeIds[]);
|
||||
void release();
|
||||
} startTransactionNodeSelectionData;
|
||||
|
||||
NdbApiSignal* theCommitAckSignal;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user