Commit ee16667b authored by mronstrom@mysql.com's avatar mronstrom@mysql.com

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
parent 9f6828fa
......@@ -45,16 +45,9 @@ Backup::Backup(const Configuration & conf) :
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_ATTRIBUTES, &noAttribs));
// To allow for user tables AND SYSTAB
// 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;
noAttribs++; //RT 527 bug fix
c_backupPool.setSize(noBackups);
c_backupFilePool.setSize(3 * noBackups);
c_tablePool.setSize(noBackups * noTables);
......
......@@ -6119,7 +6119,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
break;
case DictTabInfo::AllNodesMediumTable:
jam();
noOfFragments = 2 * cnoOfNodeGroups;
noOfFragments = csystemnodes;
break;
case DictTabInfo::AllNodesLargeTable:
jam();
......@@ -6141,7 +6141,7 @@ void Dbdih::execCREATE_FRAGMENTATION_REQ(Signal * signal){
}
if(err)
break;
NodeGroupRecordPtr NGPtr;
TabRecordPtr primTabPtr;
if (primaryTableId == RNIL) {
......
......@@ -108,7 +108,7 @@ public:
private:
// 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 MaxAttrDataSize = 2048;
public:
......
......@@ -94,9 +94,15 @@ SumaParticipant::SumaParticipant(const Configuration & conf) :
/**
* @todo: fix pool sizes
*/
Uint32 noTables;
const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
ndbrequire(p != 0);
c_tablePool_.setSize(MAX_TABLES);
c_tables.setSize(MAX_TABLES);
ndb_mgm_get_int_parameter(p, CFG_DB_NO_TABLES,
&noTables);
c_tablePool_.setSize(noTables);
c_tables.setSize(noTables);
c_subscriptions.setSize(20); //10
c_subscriberPool.setSize(64);
......
......@@ -508,15 +508,19 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
}
}
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
*/
ConfigValuesFactory cfg(ownConfig);
noOfTables+= 2; // Add System tables
noOfAttributes += 5; // Add System table attributes
if (noOfLocalScanRecords == 0) {
noOfLocalScanRecords = (noOfDBNodes * noOfScanRecords) + 1;
}
......
......@@ -148,7 +148,7 @@
// need large value.
/* ------------------------------------------------------------------------- */
#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
......
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