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
......@@ -46,14 +46,7 @@ Backup::Backup(const Configuration & conf) :
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);
......
......@@ -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();
......
......@@ -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);
......
......@@ -509,14 +509,18 @@ 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