Commit afe21e63 authored by unknown's avatar unknown

1) Default config is 1 frag per node

2) MAX_FRAG_PER_NODE separated from NO_OF_FRAG_PER_NODE and
takes into account large fragmentation
3) SUMA use config parameter instead of hard coded limit


ndb/src/kernel/blocks/backup/BackupInit.cpp:
  Moved addition of system tables and its attributes to Configuration.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Medium == default is one fragment per node
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Use MAX_FRAG_PER_NODE, NO_OF_FRAG_PER_NODE is used for
  allocation purposes, still allowed to create a table with
  many fragments
ndb/src/kernel/blocks/suma/SumaInit.cpp:
  Use max no of tables configured instead of maximum configurable
ndb/src/kernel/vm/Configuration.cpp:
  Update configuration to handle also system tables and their attributes
ndb/src/kernel/vm/pc.hpp:
  Maximum fragments per node is 8 in the worst case
parent cab5529e
...@@ -45,16 +45,9 @@ Backup::Backup(const Configuration & conf) : ...@@ -45,16 +45,9 @@ Backup::Backup(const Configuration & conf) :
ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_BACKUPS, &noBackups); ndb_mgm_get_int_parameter(p, CFG_DB_PARALLEL_BACKUPS, &noBackups);
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES, &noTables));
ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES, &noAttribs)); ndbrequire(!ndb_mgm_get_int_parameter(p, CFG_DB_NO_ATTRIBUTES, &noAttribs));
// To allow for user tables AND SYSTAB noAttribs++; //RT 527 bug fix
// See ClusterConfig
//TODO get this infor from NdbCntr
noTables += 2;
// Considering also TR527, this is a KISS work-around to be able to
// continue testing the real thing
noAttribs += 2 + 1;
c_backupPool.setSize(noBackups); c_backupPool.setSize(noBackups);
c_backupFilePool.setSize(3 * noBackups); c_backupFilePool.setSize(3 * noBackups);
c_tablePool.setSize(noBackups * noTables); c_tablePool.setSize(noBackups * noTables);
......
...@@ -6119,7 +6119,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){ ...@@ -6119,7 +6119,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
break; break;
case DictTabInfo::AllNodesMediumTable: case DictTabInfo::AllNodesMediumTable:
jam(); jam();
noOfFragments = 2 * cnoOfNodeGroups; noOfFragments = csystemnodes;
break; break;
case DictTabInfo::AllNodesLargeTable: case DictTabInfo::AllNodesLargeTable:
jam(); jam();
...@@ -6141,7 +6141,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){ ...@@ -6141,7 +6141,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
} }
if(err) if(err)
break; break;
NodeGroupRecordPtr NGPtr; NodeGroupRecordPtr NGPtr;
TabRecordPtr primTabPtr; TabRecordPtr primTabPtr;
if (primaryTableId == RNIL) { if (primaryTableId == RNIL) {
......
...@@ -108,7 +108,7 @@ public: ...@@ -108,7 +108,7 @@ public:
private: private:
// sizes are in words (Uint32) // sizes are in words (Uint32)
static const unsigned MaxIndexFragments = 2 * NO_OF_FRAG_PER_NODE; static const unsigned MaxIndexFragments = 2 * MAX_FRAG_PER_NODE;
static const unsigned MaxIndexAttributes = MAX_ATTRIBUTES_IN_INDEX; static const unsigned MaxIndexAttributes = MAX_ATTRIBUTES_IN_INDEX;
static const unsigned MaxAttrDataSize = 2048; static const unsigned MaxAttrDataSize = 2048;
public: public:
......
...@@ -94,9 +94,15 @@ SumaParticipant::SumaParticipant(const Configuration & conf) : ...@@ -94,9 +94,15 @@ SumaParticipant::SumaParticipant(const Configuration & conf) :
/** /**
* @todo: fix pool sizes * @todo: fix pool sizes
*/ */
Uint32 noTables;
const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
ndbrequire(p != 0);
c_tablePool_.setSize(MAX_TABLES); ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES,
c_tables.setSize(MAX_TABLES); &noTables);
c_tablePool_.setSize(noTables);
c_tables.setSize(noTables);
c_subscriptions.setSize(20); //10 c_subscriptions.setSize(20); //10
c_subscriberPool.setSize(64); c_subscriberPool.setSize(64);
......
...@@ -508,15 +508,19 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -508,15 +508,19 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
} }
} }
noOfNodes = nodeNo; noOfNodes = nodeNo;
noOfTables+= 2; // Add System tables
noOfAttributes += 5; // Add System table attributes
ConfigValues::Iterator it2(*ownConfig, db.m_config);
it2.set(CFG_DB_NO_TABLES, noOfTables);
it2.set(CFG_DB_NO_ATTRIBUTES, noOfAttributes);
/** /**
* Do size calculations * Do size calculations
*/ */
ConfigValuesFactory cfg(ownConfig); ConfigValuesFactory cfg(ownConfig);
noOfTables+= 2; // Add System tables
noOfAttributes += 5; // Add System table attributes
if (noOfLocalScanRecords == 0) { if (noOfLocalScanRecords == 0) {
noOfLocalScanRecords = (noOfDBNodes * noOfScanRecords) + 1; noOfLocalScanRecords = (noOfDBNodes * noOfScanRecords) + 1;
} }
......
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
// need large value. // need large value.
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
#define NO_OF_FRAG_PER_NODE 1 #define NO_OF_FRAG_PER_NODE 1
#define MAX_FRAG_PER_NODE (NO_OF_FRAG_PER_NODE * MAX_REPLICAS) #define MAX_FRAG_PER_NODE 8
/* ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- */
// To avoid synching too big chunks at a time we synch after writing // To avoid synching too big chunks at a time we synch after writing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment