Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7c1eb264
Commit
7c1eb264
authored
Aug 21, 2004
by
mronstrom@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New config parameters
malloc -> NdbMem_Allocate
parent
4fe6ab1f
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
160 additions
and
89 deletions
+160
-89
ndb/include/mgmapi/mgmapi_config_parameters.h
ndb/include/mgmapi/mgmapi_config_parameters.h
+6
-0
ndb/src/common/mgmcommon/ConfigInfo.cpp
ndb/src/common/mgmcommon/ConfigInfo.cpp
+63
-2
ndb/src/common/mgmcommon/LocalConfig.cpp
ndb/src/common/mgmcommon/LocalConfig.cpp
+3
-2
ndb/src/common/mgmcommon/NdbConfig.c
ndb/src/common/mgmcommon/NdbConfig.c
+3
-2
ndb/src/common/portlib/NdbCondition.c
ndb/src/common/portlib/NdbCondition.c
+2
-1
ndb/src/common/portlib/NdbMutex.c
ndb/src/common/portlib/NdbMutex.c
+2
-1
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+2
-1
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+1
-3
ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
+7
-5
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+22
-22
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+1
-1
ndb/src/kernel/vm/Configuration.cpp
ndb/src/kernel/vm/Configuration.cpp
+47
-48
ndb/src/kernel/vm/pc.hpp
ndb/src/kernel/vm/pc.hpp
+1
-1
No files found.
ndb/include/mgmapi/mgmapi_config_parameters.h
View file @
7c1eb264
...
@@ -77,6 +77,12 @@
...
@@ -77,6 +77,12 @@
#define CFG_DB_DISCLESS 148
#define CFG_DB_DISCLESS 148
#define CFG_DB_NO_ORDERED_INDEXES 149
#define CFG_DB_NO_UNIQUE_HASH_INDEXES 150
#define CFG_DB_NO_LOCAL_OPS 151
#define CFG_DB_NO_LOCAL_SCANS 152
#define CFG_DB_BATCH_SIZE 153
#define CFG_NODE_ARBIT_RANK 200
#define CFG_NODE_ARBIT_RANK 200
#define CFG_NODE_ARBIT_DELAY 201
#define CFG_NODE_ARBIT_DELAY 201
...
...
ndb/src/common/mgmcommon/ConfigInfo.cpp
View file @
7c1eb264
...
@@ -405,12 +405,36 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
...
@@ -405,12 +405,36 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
8
,
8
,
MAX_INT_RNIL
},
MAX_INT_RNIL
},
{
CFG_DB_NO_ORDERED_INDEXES
,
"MaxNoOfOrderedIndexes"
,
"DB"
,
"Total number of ordered indexes that can be defined in the system"
,
ConfigInfo
::
USED
,
false
,
ConfigInfo
::
INT
,
128
,
0
,
MAX_INT_RNIL
},
{
CFG_DB_NO_UNIQUE_HASH_INDEXES
,
"MaxNoOfUniqueHashIndexes"
,
"DB"
,
"Total number of unique hash indexes that can be defined in the system"
,
ConfigInfo
::
USED
,
false
,
ConfigInfo
::
INT
,
64
,
0
,
MAX_INT_RNIL
},
{
{
CFG_DB_NO_INDEXES
,
CFG_DB_NO_INDEXES
,
"MaxNoOfIndexes"
,
"MaxNoOfIndexes"
,
"DB"
,
"DB"
,
"Total number of indexes that can be defined in the system"
,
"Total number of indexes that can be defined in the system"
,
ConfigInfo
::
US
ED
,
ConfigInfo
::
DEPRICAT
ED
,
false
,
false
,
ConfigInfo
::
INT
,
ConfigInfo
::
INT
,
128
,
128
,
...
@@ -530,7 +554,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
...
@@ -530,7 +554,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
CFG_DB_NO_OPS
,
CFG_DB_NO_OPS
,
"MaxNoOfConcurrentOperations"
,
"MaxNoOfConcurrentOperations"
,
"DB"
,
"DB"
,
"Max n
o of op:s on DB (op:s within a transaction are concurrently executed)
"
,
"Max n
umber of operation records in transaction coordinator
"
,
ConfigInfo
::
USED
,
ConfigInfo
::
USED
,
false
,
false
,
ConfigInfo
::
INT
,
ConfigInfo
::
INT
,
...
@@ -538,6 +562,43 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
...
@@ -538,6 +562,43 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
32
,
32
,
MAX_INT_RNIL
},
MAX_INT_RNIL
},
{
CFG_DB_NO_LOCAL_OPS
,
"MaxNoOfLocalOperations"
,
"DB"
,
"Max number of operation records defined in the local storage node"
,
ConfigInfo
::
USED
,
false
,
ConfigInfo
::
INT
,
0
,
//0 means that it is calculated using MaxNoOfConcurrentOperations
32
,
MAX_INT_RNIL
},
{
CFG_DB_NO_LOCAL_SCANS
,
"MaxNoOfLocalScans"
,
"DB"
,
"Max number of fragment scans in parallel in the local storage node"
,
ConfigInfo
::
USED
,
false
,
ConfigInfo
::
INT
,
0
,
//0 means that it is calculated using MaxNoOfConcurrentScans
32
,
MAX_INT_RNIL
},
{
CFG_DB_BATCH_SIZE
,
"BatchSizePerLocalScan"
,
"DB"
,
"Used to calculate the number of lock records for scan with hold lock"
,
ConfigInfo
::
USED
,
false
,
ConfigInfo
::
INT
,
32
,
1
,
MAX_INT_RNIL
},
{
{
CFG_DB_NO_TRANSACTIONS
,
CFG_DB_NO_TRANSACTIONS
,
"MaxNoOfConcurrentTransactions"
,
"MaxNoOfConcurrentTransactions"
,
...
...
ndb/src/common/mgmcommon/LocalConfig.cpp
View file @
7c1eb264
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <NdbEnv.h>
#include <NdbEnv.h>
#include <NdbConfig.h>
#include <NdbConfig.h>
#include <NdbAutoPtr.hpp>
#include <NdbAutoPtr.hpp>
#include <NdbMem.h>
LocalConfig
::
LocalConfig
(){
LocalConfig
::
LocalConfig
(){
error_line
=
0
;
error_msg
[
0
]
=
0
;
error_line
=
0
;
error_msg
[
0
]
=
0
;
...
@@ -242,7 +243,7 @@ bool LocalConfig::readFile(const char * filename, bool &fopenError)
...
@@ -242,7 +243,7 @@ bool LocalConfig::readFile(const char * filename, bool &fopenError)
}
}
int
sz
=
1024
;
int
sz
=
1024
;
char
*
theString
=
(
char
*
)
malloc
(
sz
);
char
*
theString
=
(
char
*
)
NdbMem_Allocate
(
sz
);
theString
[
0
]
=
0
;
theString
[
0
]
=
0
;
fgets
(
theString
,
sz
,
file
);
fgets
(
theString
,
sz
,
file
);
...
@@ -250,7 +251,7 @@ bool LocalConfig::readFile(const char * filename, bool &fopenError)
...
@@ -250,7 +251,7 @@ bool LocalConfig::readFile(const char * filename, bool &fopenError)
line
[
0
]
=
';'
;
line
[
0
]
=
';'
;
while
(
strlen
(
theString
)
+
strlen
(
line
)
>=
sz
)
{
while
(
strlen
(
theString
)
+
strlen
(
line
)
>=
sz
)
{
sz
=
sz
*
2
;
sz
=
sz
*
2
;
char
*
newString
=
(
char
*
)
malloc
(
sz
);
char
*
newString
=
(
char
*
)
NdbMem_Allocate
(
sz
);
strcpy
(
newString
,
theString
);
strcpy
(
newString
,
theString
);
free
(
theString
);
free
(
theString
);
theString
=
newString
;
theString
=
newString
;
...
...
ndb/src/common/mgmcommon/NdbConfig.c
View file @
7c1eb264
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#include <ndb_global.h>
#include <ndb_global.h>
#include <NdbConfig.h>
#include <NdbConfig.h>
#include <NdbEnv.h>
#include <NdbEnv.h>
#include <NdbMem.h>
static
char
*
static
char
*
NdbConfig_AllocHomePath
(
int
_len
)
NdbConfig_AllocHomePath
(
int
_len
)
...
@@ -30,7 +31,7 @@ NdbConfig_AllocHomePath(int _len)
...
@@ -30,7 +31,7 @@ NdbConfig_AllocHomePath(int _len)
path_len
=
strlen
(
path
);
path_len
=
strlen
(
path
);
len
+=
path_len
;
len
+=
path_len
;
buf
=
malloc
(
len
);
buf
=
NdbMem_Allocate
(
len
);
if
(
path_len
>
0
)
if
(
path_len
>
0
)
snprintf
(
buf
,
len
,
"%s%c"
,
path
,
DIR_SEPARATOR
);
snprintf
(
buf
,
len
,
"%s%c"
,
path
,
DIR_SEPARATOR
);
else
else
...
@@ -48,7 +49,7 @@ NdbConfig_NdbCfgName(int with_ndb_home){
...
@@ -48,7 +49,7 @@ NdbConfig_NdbCfgName(int with_ndb_home){
buf
=
NdbConfig_AllocHomePath
(
128
);
buf
=
NdbConfig_AllocHomePath
(
128
);
len
=
strlen
(
buf
);
len
=
strlen
(
buf
);
}
else
}
else
buf
=
malloc
(
128
);
buf
=
NdbMem_Allocate
(
128
);
snprintf
(
buf
+
len
,
128
,
"Ndb.cfg"
);
snprintf
(
buf
+
len
,
128
,
"Ndb.cfg"
);
return
buf
;
return
buf
;
}
}
...
...
ndb/src/common/portlib/NdbCondition.c
View file @
7c1eb264
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include <NdbCondition.h>
#include <NdbCondition.h>
#include <NdbThread.h>
#include <NdbThread.h>
#include <NdbMutex.h>
#include <NdbMutex.h>
#include <NdbMem.h>
struct
NdbCondition
struct
NdbCondition
{
{
...
@@ -34,7 +35,7 @@ NdbCondition_Create(void)
...
@@ -34,7 +35,7 @@ NdbCondition_Create(void)
struct
NdbCondition
*
tmpCond
;
struct
NdbCondition
*
tmpCond
;
int
result
;
int
result
;
tmpCond
=
(
struct
NdbCondition
*
)
malloc
(
sizeof
(
struct
NdbCondition
));
tmpCond
=
(
struct
NdbCondition
*
)
NdbMem_Allocate
(
sizeof
(
struct
NdbCondition
));
if
(
tmpCond
==
NULL
)
if
(
tmpCond
==
NULL
)
return
NULL
;
return
NULL
;
...
...
ndb/src/common/portlib/NdbMutex.c
View file @
7c1eb264
...
@@ -19,13 +19,14 @@
...
@@ -19,13 +19,14 @@
#include <NdbThread.h>
#include <NdbThread.h>
#include <NdbMutex.h>
#include <NdbMutex.h>
#include <NdbMem.h>
NdbMutex
*
NdbMutex_Create
(
void
)
NdbMutex
*
NdbMutex_Create
(
void
)
{
{
NdbMutex
*
pNdbMutex
;
NdbMutex
*
pNdbMutex
;
int
result
;
int
result
;
pNdbMutex
=
(
NdbMutex
*
)
malloc
(
sizeof
(
NdbMutex
));
pNdbMutex
=
(
NdbMutex
*
)
NdbMem_Allocate
(
sizeof
(
NdbMutex
));
if
(
pNdbMutex
==
NULL
)
if
(
pNdbMutex
==
NULL
)
return
NULL
;
return
NULL
;
...
...
ndb/src/common/portlib/NdbThread.c
View file @
7c1eb264
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#include <ndb_global.h>
#include <ndb_global.h>
#include <NdbThread.h>
#include <NdbThread.h>
#include <pthread.h>
#include <pthread.h>
#include <NdbMem.h>
#define MAX_THREAD_NAME 16
#define MAX_THREAD_NAME 16
...
@@ -44,7 +45,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
...
@@ -44,7 +45,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
if
(
p_thread_func
==
NULL
)
if
(
p_thread_func
==
NULL
)
return
0
;
return
0
;
tmpThread
=
(
struct
NdbThread
*
)
malloc
(
sizeof
(
struct
NdbThread
));
tmpThread
=
(
struct
NdbThread
*
)
NdbMem_Allocate
(
sizeof
(
struct
NdbThread
));
if
(
tmpThread
==
NULL
)
if
(
tmpThread
==
NULL
)
return
NULL
;
return
NULL
;
...
...
ndb/src/kernel/blocks/dbtc/Dbtc.hpp
View file @
7c1eb264
...
@@ -542,13 +542,11 @@ public:
...
@@ -542,13 +542,11 @@ public:
attrInfo
(
abp
),
attrInfo
(
abp
),
expectedTransIdAI
(
0
),
expectedTransIdAI
(
0
),
transIdAI
(
abp
),
transIdAI
(
abp
),
tcIndxReq
(
new
TcIndxReq
()),
indexReadTcConnect
(
RNIL
)
indexReadTcConnect
(
RNIL
)
{}
{}
~
TcIndexOperation
()
~
TcIndexOperation
()
{
{
delete
tcIndxReq
;
}
}
// Index data
// Index data
...
@@ -561,7 +559,7 @@ public:
...
@@ -561,7 +559,7 @@ public:
Uint32
expectedTransIdAI
;
Uint32
expectedTransIdAI
;
AttributeBuffer
transIdAI
;
// For accumulating TransId_AI
AttributeBuffer
transIdAI
;
// For accumulating TransId_AI
TcIndxReq
*
tcIndxReq
;
TcIndxReq
tcIndxReq
;
UintR
connectionIndex
;
UintR
connectionIndex
;
UintR
indexReadTcConnect
;
//
UintR
indexReadTcConnect
;
//
...
...
ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
View file @
7c1eb264
...
@@ -73,6 +73,7 @@ void Dbtc::initData()
...
@@ -73,6 +73,7 @@ void Dbtc::initData()
void
Dbtc
::
initRecords
()
void
Dbtc
::
initRecords
()
{
{
void
*
p
;
// Records with dynamic sizes
// Records with dynamic sizes
cacheRecord
=
(
CacheRecord
*
)
allocRecord
(
"CacheRecord"
,
cacheRecord
=
(
CacheRecord
*
)
allocRecord
(
"CacheRecord"
,
sizeof
(
CacheRecord
),
sizeof
(
CacheRecord
),
...
@@ -83,7 +84,7 @@ void Dbtc::initRecords()
...
@@ -83,7 +84,7 @@ void Dbtc::initRecords()
capiConnectFilesize
);
capiConnectFilesize
);
for
(
unsigned
i
=
0
;
i
<
capiConnectFilesize
;
i
++
)
{
for
(
unsigned
i
=
0
;
i
<
capiConnectFilesize
;
i
++
)
{
void
*
p
=
&
apiConnectRecord
[
i
];
p
=
&
apiConnectRecord
[
i
];
new
(
p
)
ApiConnectRecord
(
c_theFiredTriggerPool
,
new
(
p
)
ApiConnectRecord
(
c_theFiredTriggerPool
,
c_theSeizedIndexOperationPool
);
c_theSeizedIndexOperationPool
);
}
}
...
@@ -91,7 +92,8 @@ void Dbtc::initRecords()
...
@@ -91,7 +92,8 @@ void Dbtc::initRecords()
DLFifoList
<
TcFiredTriggerData
>
triggers
(
c_theFiredTriggerPool
);
DLFifoList
<
TcFiredTriggerData
>
triggers
(
c_theFiredTriggerPool
);
FiredTriggerPtr
tptr
;
FiredTriggerPtr
tptr
;
while
(
triggers
.
seize
(
tptr
)
==
true
)
{
while
(
triggers
.
seize
(
tptr
)
==
true
)
{
new
(
tptr
.
p
)
TcFiredTriggerData
();
p
=
tptr
.
p
;
new
(
p
)
TcFiredTriggerData
();
}
}
triggers
.
release
();
triggers
.
release
();
...
@@ -109,7 +111,8 @@ void Dbtc::initRecords()
...
@@ -109,7 +111,8 @@ void Dbtc::initRecords()
ArrayList
<
TcIndexOperation
>
indexOps
(
c_theIndexOperationPool
);
ArrayList
<
TcIndexOperation
>
indexOps
(
c_theIndexOperationPool
);
TcIndexOperationPtr
ioptr
;
TcIndexOperationPtr
ioptr
;
while
(
indexOps
.
seize
(
ioptr
)
==
true
)
{
while
(
indexOps
.
seize
(
ioptr
)
==
true
)
{
new
(
ioptr
.
p
)
TcIndexOperation
(
c_theAttributeBufferPool
);
p
=
ioptr
.
p
;
new
(
p
)
TcIndexOperation
(
c_theAttributeBufferPool
);
}
}
indexOps
.
release
();
indexOps
.
release
();
...
@@ -179,7 +182,6 @@ Dbtc::Dbtc(const class Configuration & conf):
...
@@ -179,7 +182,6 @@ Dbtc::Dbtc(const class Configuration & conf):
c_maxNumberOfIndexOperations
(
0
),
c_maxNumberOfIndexOperations
(
0
),
m_commitAckMarkerHash
(
m_commitAckMarkerPool
)
m_commitAckMarkerHash
(
m_commitAckMarkerPool
)
{
{
BLOCK_CONSTRUCTOR
(
Dbtc
);
BLOCK_CONSTRUCTOR
(
Dbtc
);
const
ndb_mgm_configuration_iterator
*
p
=
conf
.
getOwnConfigIterator
();
const
ndb_mgm_configuration_iterator
*
p
=
conf
.
getOwnConfigIterator
();
...
@@ -191,7 +193,7 @@ Dbtc::Dbtc(const class Configuration & conf):
...
@@ -191,7 +193,7 @@ Dbtc::Dbtc(const class Configuration & conf):
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_TRANS_BUFFER_MEM
,
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_TRANS_BUFFER_MEM
,
&
transactionBufferMemory
);
&
transactionBufferMemory
);
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_INDEXES
,
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_
UNIQUE_HASH_
INDEXES
,
&
maxNoOfIndexes
);
&
maxNoOfIndexes
);
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_INDEX_OPS
,
ndb_mgm_get_int_parameter
(
p
,
CFG_DB_NO_INDEX_OPS
,
&
maxNoOfConcurrentIndexOperations
);
&
maxNoOfConcurrentIndexOperations
);
...
...
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
View file @
7c1eb264
...
@@ -11033,7 +11033,7 @@ void Dbtc::execTCINDXREQ(Signal* signal)
...
@@ -11033,7 +11033,7 @@ void Dbtc::execTCINDXREQ(Signal* signal)
indexOp
->
indexOpId
=
indexOpPtr
.
i
;
indexOp
->
indexOpId
=
indexOpPtr
.
i
;
// Save original signal
// Save original signal
*
indexOp
->
tcIndxReq
=
*
tcIndxReq
;
indexOp
->
tcIndxReq
=
*
tcIndxReq
;
indexOp
->
connectionIndex
=
TapiIndex
;
indexOp
->
connectionIndex
=
TapiIndex
;
regApiPtr
->
accumulatingIndexOp
=
indexOp
->
indexOpId
;
regApiPtr
->
accumulatingIndexOp
=
indexOp
->
indexOpId
;
...
@@ -11342,7 +11342,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
...
@@ -11342,7 +11342,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
// Should never happen, abort
// Should never happen, abort
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
tcIndxRef
->
errorCode
=
4349
;
...
@@ -11361,7 +11361,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
...
@@ -11361,7 +11361,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
// Double TCKEYCONF, should never happen, abort
// Double TCKEYCONF, should never happen, abort
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
tcIndxRef
->
errorCode
=
4349
;
...
@@ -11382,7 +11382,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
...
@@ -11382,7 +11382,7 @@ void Dbtc::execTCKEYCONF(Signal* signal)
// Copy reply from TcKeyConf
// Copy reply from TcKeyConf
regApiPtr
->
noIndexOp
--
;
// Decrease count
regApiPtr
->
noIndexOp
--
;
// Decrease count
regApiPtr
->
tcIndxSendArray
[
Ttcindxrec
]
=
indexOp
->
tcIndxReq
->
senderData
;
regApiPtr
->
tcIndxSendArray
[
Ttcindxrec
]
=
indexOp
->
tcIndxReq
.
senderData
;
regApiPtr
->
tcIndxSendArray
[
Ttcindxrec
+
1
]
=
regApiPtr
->
tcIndxSendArray
[
Ttcindxrec
+
1
]
=
tcKeyConf
->
operations
[
0
].
attrInfoLen
;
tcKeyConf
->
operations
[
0
].
attrInfoLen
;
regApiPtr
->
tcindxrec
=
Ttcindxrec
+
2
;
regApiPtr
->
tcindxrec
=
Ttcindxrec
+
2
;
...
@@ -11415,7 +11415,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
...
@@ -11415,7 +11415,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
}
}
const
UintR
TconnectIndex
=
indexOp
->
connectionIndex
;
const
UintR
TconnectIndex
=
indexOp
->
connectionIndex
;
ApiConnectRecord
*
const
regApiPtr
=
&
apiConnectRecord
[
TconnectIndex
];
ApiConnectRecord
*
const
regApiPtr
=
&
apiConnectRecord
[
TconnectIndex
];
Uint32
tcKeyRequestInfo
=
indexOp
->
tcIndxReq
->
requestInfo
;
Uint32
tcKeyRequestInfo
=
indexOp
->
tcIndxReq
.
requestInfo
;
Uint32
commitFlg
=
TcKeyReq
::
getCommitFlag
(
tcKeyRequestInfo
);
Uint32
commitFlg
=
TcKeyReq
::
getCommitFlag
(
tcKeyRequestInfo
);
switch
(
indexOp
->
indexOpState
)
{
switch
(
indexOp
->
indexOpState
)
{
...
@@ -11445,7 +11445,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
...
@@ -11445,7 +11445,7 @@ void Dbtc::execTCKEYREF(Signal* signal)
// Send TCINDXREF
// Send TCINDXREF
jam
();
jam
();
TcIndxReq
*
const
tcIndxReq
=
indexOp
->
tcIndxReq
;
TcIndxReq
*
const
tcIndxReq
=
&
indexOp
->
tcIndxReq
;
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
regApiPtr
->
noIndexOp
--
;
// Decrease count
regApiPtr
->
noIndexOp
--
;
// Decrease count
...
@@ -11523,7 +11523,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
...
@@ -11523,7 +11523,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
// Failed to allocate space for TransIdAI
// Failed to allocate space for TransIdAI
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4000
;
tcIndxRef
->
errorCode
=
4000
;
...
@@ -11538,7 +11538,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
...
@@ -11538,7 +11538,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
// Should never happen, abort
// Should never happen, abort
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
tcIndxRef
->
errorCode
=
4349
;
...
@@ -11566,7 +11566,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
...
@@ -11566,7 +11566,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
// Too many TRANSID_AI
// Too many TRANSID_AI
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend();
TcIndxRef * const tcIndxRef = (TcIndxRef *)signal->getDataPtrSend();
tcIndexRef->connectPtr = indexOp->tcIndxReq
->
senderData;
tcIndexRef->connectPtr = indexOp->tcIndxReq
.
senderData;
tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[0] = regApiPtr->transid[0];
tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->transId[1] = regApiPtr->transid[1];
tcIndxRef->errorCode = 4349;
tcIndxRef->errorCode = 4349;
...
@@ -11591,7 +11591,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
...
@@ -11591,7 +11591,7 @@ void Dbtc::execTRANSID_AI(Signal* signal)
jam
();
jam
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
tcIndxRef
->
errorCode
=
4349
;
...
@@ -11611,7 +11611,7 @@ void Dbtc::execTCROLLBACKREP(Signal* signal)
...
@@ -11611,7 +11611,7 @@ void Dbtc::execTCROLLBACKREP(Signal* signal)
TcIndexOperation
*
indexOp
=
c_theIndexOperations
.
getPtr
(
indexOpPtr
.
i
);
TcIndexOperation
*
indexOp
=
c_theIndexOperations
.
getPtr
(
indexOpPtr
.
i
);
indexOpPtr
.
p
=
indexOp
;
indexOpPtr
.
p
=
indexOp
;
tcRollbackRep
=
(
TcRollbackRep
*
)
signal
->
getDataPtrSend
();
tcRollbackRep
=
(
TcRollbackRep
*
)
signal
->
getDataPtrSend
();
tcRollbackRep
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcRollbackRep
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
sendSignal
(
apiConnectptr
.
p
->
ndbapiBlockref
,
sendSignal
(
apiConnectptr
.
p
->
ndbapiBlockref
,
GSN_TCROLLBACKREP
,
signal
,
TcRollbackRep
::
SignalLength
,
JBB
);
GSN_TCROLLBACKREP
,
signal
,
TcRollbackRep
::
SignalLength
,
JBB
);
}
}
...
@@ -11628,23 +11628,23 @@ void Dbtc::readIndexTable(Signal* signal,
...
@@ -11628,23 +11628,23 @@ void Dbtc::readIndexTable(Signal* signal,
TcKeyReq
*
const
tcKeyReq
=
(
TcKeyReq
*
)
signal
->
getDataPtrSend
();
TcKeyReq
*
const
tcKeyReq
=
(
TcKeyReq
*
)
signal
->
getDataPtrSend
();
Uint32
*
dataPtr
=
&
tcKeyReq
->
scanInfo
;
Uint32
*
dataPtr
=
&
tcKeyReq
->
scanInfo
;
Uint32
tcKeyLength
=
TcKeyReq
::
StaticLength
;
Uint32
tcKeyLength
=
TcKeyReq
::
StaticLength
;
Uint32
tcKeyRequestInfo
=
indexOp
->
tcIndxReq
->
requestInfo
;
Uint32
tcKeyRequestInfo
=
indexOp
->
tcIndxReq
.
requestInfo
;
AttributeBuffer
::
DataBufferIterator
keyIter
;
AttributeBuffer
::
DataBufferIterator
keyIter
;
Uint32
keyLength
=
TcKeyReq
::
getKeyLength
(
tcKeyRequestInfo
);
Uint32
keyLength
=
TcKeyReq
::
getKeyLength
(
tcKeyRequestInfo
);
TcIndexData
*
indexData
;
TcIndexData
*
indexData
;
Uint32
transId1
=
indexOp
->
tcIndxReq
->
transId1
;
Uint32
transId1
=
indexOp
->
tcIndxReq
.
transId1
;
Uint32
transId2
=
indexOp
->
tcIndxReq
->
transId2
;
Uint32
transId2
=
indexOp
->
tcIndxReq
.
transId2
;
const
Operation_t
opType
=
const
Operation_t
opType
=
(
Operation_t
)
TcKeyReq
::
getOperationType
(
tcKeyRequestInfo
);
(
Operation_t
)
TcKeyReq
::
getOperationType
(
tcKeyRequestInfo
);
// Find index table
// Find index table
if
((
indexData
=
c_theIndexes
.
getPtr
(
indexOp
->
tcIndxReq
->
indexId
))
==
NULL
)
{
if
((
indexData
=
c_theIndexes
.
getPtr
(
indexOp
->
tcIndxReq
.
indexId
))
==
NULL
)
{
jam
();
jam
();
// Failed to find index record
// Failed to find index record
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4000
;
tcIndxRef
->
errorCode
=
4000
;
...
@@ -11656,7 +11656,7 @@ void Dbtc::readIndexTable(Signal* signal,
...
@@ -11656,7 +11656,7 @@ void Dbtc::readIndexTable(Signal* signal,
tcKeyReq
->
transId2
=
transId2
;
tcKeyReq
->
transId2
=
transId2
;
tcKeyReq
->
tableId
=
indexData
->
indexId
;
tcKeyReq
->
tableId
=
indexData
->
indexId
;
tcKeyLength
+=
MIN
(
keyLength
,
keyBufSize
);
tcKeyLength
+=
MIN
(
keyLength
,
keyBufSize
);
tcKeyReq
->
tableSchemaVersion
=
indexOp
->
tcIndxReq
->
indexSchemaVersion
;
tcKeyReq
->
tableSchemaVersion
=
indexOp
->
tcIndxReq
.
indexSchemaVersion
;
TcKeyReq
::
setOperationType
(
tcKeyRequestInfo
,
TcKeyReq
::
setOperationType
(
tcKeyRequestInfo
,
opType
==
ZREAD
?
opType
:
ZREAD_EX
);
opType
==
ZREAD
?
opType
:
ZREAD_EX
);
TcKeyReq
::
setAIInTcKeyReq
(
tcKeyRequestInfo
,
1
);
// Allways send one AttrInfo
TcKeyReq
::
setAIInTcKeyReq
(
tcKeyRequestInfo
,
1
);
// Allways send one AttrInfo
...
@@ -11705,7 +11705,7 @@ void Dbtc::readIndexTable(Signal* signal,
...
@@ -11705,7 +11705,7 @@ void Dbtc::readIndexTable(Signal* signal,
// Send KEYINFO sequence
// Send KEYINFO sequence
KeyInfo
*
const
keyInfo
=
(
KeyInfo
*
)
signal
->
getDataPtrSend
();
KeyInfo
*
const
keyInfo
=
(
KeyInfo
*
)
signal
->
getDataPtrSend
();
keyInfo
->
connectPtr
=
indexOp
->
tcIndxReq
->
apiConnectPtr
;
keyInfo
->
connectPtr
=
indexOp
->
tcIndxReq
.
apiConnectPtr
;
keyInfo
->
transId
[
0
]
=
transId1
;
keyInfo
->
transId
[
0
]
=
transId1
;
keyInfo
->
transId
[
1
]
=
transId2
;
keyInfo
->
transId
[
1
]
=
transId2
;
dataPtr
=
(
Uint32
*
)
&
keyInfo
->
keyData
;
dataPtr
=
(
Uint32
*
)
&
keyInfo
->
keyData
;
...
@@ -11745,7 +11745,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
...
@@ -11745,7 +11745,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
Uint32
keyBufSize
=
8
;
// Maximum for key in TCKEYREQ
Uint32
keyBufSize
=
8
;
// Maximum for key in TCKEYREQ
Uint32
attrBufSize
=
5
;
Uint32
attrBufSize
=
5
;
Uint32
dataPos
=
0
;
Uint32
dataPos
=
0
;
TcIndxReq
*
const
tcIndxReq
=
indexOp
->
tcIndxReq
;
TcIndxReq
*
const
tcIndxReq
=
&
indexOp
->
tcIndxReq
;
TcKeyReq
*
const
tcKeyReq
=
(
TcKeyReq
*
)
signal
->
getDataPtrSend
();
TcKeyReq
*
const
tcKeyReq
=
(
TcKeyReq
*
)
signal
->
getDataPtrSend
();
Uint32
*
dataPtr
=
&
tcKeyReq
->
scanInfo
;
Uint32
*
dataPtr
=
&
tcKeyReq
->
scanInfo
;
Uint32
tcKeyLength
=
TcKeyReq
::
StaticLength
;
Uint32
tcKeyLength
=
TcKeyReq
::
StaticLength
;
...
@@ -11761,7 +11761,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
...
@@ -11761,7 +11761,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
// Failed to find index record
// Failed to find index record
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
TcIndxRef
*
const
tcIndxRef
=
(
TcIndxRef
*
)
signal
->
getDataPtrSend
();
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
->
senderData
;
tcIndxRef
->
connectPtr
=
indexOp
->
tcIndxReq
.
senderData
;
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
tcIndxRef
->
errorCode
=
4349
;
tcIndxRef
->
errorCode
=
4349
;
...
@@ -11861,7 +11861,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
...
@@ -11861,7 +11861,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
// Send KEYINFO sequence
// Send KEYINFO sequence
KeyInfo
*
const
keyInfo
=
(
KeyInfo
*
)
signal
->
getDataPtrSend
();
KeyInfo
*
const
keyInfo
=
(
KeyInfo
*
)
signal
->
getDataPtrSend
();
keyInfo
->
connectPtr
=
indexOp
->
tcIndxReq
->
apiConnectPtr
;
keyInfo
->
connectPtr
=
indexOp
->
tcIndxReq
.
apiConnectPtr
;
keyInfo
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
keyInfo
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
keyInfo
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
keyInfo
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
dataPtr
=
(
Uint32
*
)
&
keyInfo
->
keyData
;
dataPtr
=
(
Uint32
*
)
&
keyInfo
->
keyData
;
...
@@ -11897,7 +11897,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
...
@@ -11897,7 +11897,7 @@ void Dbtc::executeIndexOperation(Signal* signal,
AttrInfo
*
const
attrInfo
=
(
AttrInfo
*
)
signal
->
getDataPtrSend
();
AttrInfo
*
const
attrInfo
=
(
AttrInfo
*
)
signal
->
getDataPtrSend
();
Uint32
attrInfoPos
=
0
;
Uint32
attrInfoPos
=
0
;
attrInfo
->
connectPtr
=
indexOp
->
tcIndxReq
->
apiConnectPtr
;
attrInfo
->
connectPtr
=
indexOp
->
tcIndxReq
.
apiConnectPtr
;
attrInfo
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
attrInfo
->
transId
[
0
]
=
regApiPtr
->
transid
[
0
];
attrInfo
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
attrInfo
->
transId
[
1
]
=
regApiPtr
->
transid
[
1
];
dataPtr
=
(
Uint32
*
)
&
attrInfo
->
attrData
;
dataPtr
=
(
Uint32
*
)
&
attrInfo
->
attrData
;
...
...
ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
View file @
7c1eb264
...
@@ -510,7 +510,7 @@ AsyncFile::extendfile(Request* request) {
...
@@ -510,7 +510,7 @@ AsyncFile::extendfile(Request* request) {
DEBUG
(
ndbout_c
(
"extendfile: maxOffset=%d, size=%d"
,
maxOffset
,
maxSize
));
DEBUG
(
ndbout_c
(
"extendfile: maxOffset=%d, size=%d"
,
maxOffset
,
maxSize
));
// Allocate a buffer and fill it with zeros
// Allocate a buffer and fill it with zeros
void
*
pbuf
=
malloc
(
maxSize
);
void
*
pbuf
=
NdbMem_Allocate
(
maxSize
);
memset
(
pbuf
,
0
,
maxSize
);
memset
(
pbuf
,
0
,
maxSize
);
for
(
int
p
=
0
;
p
<=
maxOffset
;
p
=
p
+
maxSize
)
{
for
(
int
p
=
0
;
p
<=
maxOffset
;
p
=
p
+
maxSize
)
{
int
return_value
;
int
return_value
;
...
...
ndb/src/kernel/vm/Configuration.cpp
View file @
7c1eb264
...
@@ -285,7 +285,7 @@ Configuration::setupConfiguration(){
...
@@ -285,7 +285,7 @@ Configuration::setupConfiguration(){
if
(
pFileSystemPath
[
strlen
(
pFileSystemPath
)
-
1
]
==
'/'
)
if
(
pFileSystemPath
[
strlen
(
pFileSystemPath
)
-
1
]
==
'/'
)
_fsPath
=
strdup
(
pFileSystemPath
);
_fsPath
=
strdup
(
pFileSystemPath
);
else
{
else
{
_fsPath
=
(
char
*
)
malloc
(
strlen
(
pFileSystemPath
)
+
2
);
_fsPath
=
(
char
*
)
NdbMem_Allocate
(
strlen
(
pFileSystemPath
)
+
2
);
strcpy
(
_fsPath
,
pFileSystemPath
);
strcpy
(
_fsPath
,
pFileSystemPath
);
strcat
(
_fsPath
,
"/"
);
strcat
(
_fsPath
,
"/"
);
}
}
...
@@ -381,7 +381,8 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -381,7 +381,8 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
char
buf
[
255
];
char
buf
[
255
];
unsigned
int
noOfTables
=
0
;
unsigned
int
noOfTables
=
0
;
unsigned
int
noOfIndexes
=
0
;
unsigned
int
noOfUniqueHashIndexes
=
0
;
unsigned
int
noOfOrderedIndexes
=
0
;
unsigned
int
noOfReplicas
=
0
;
unsigned
int
noOfReplicas
=
0
;
unsigned
int
noOfDBNodes
=
0
;
unsigned
int
noOfDBNodes
=
0
;
unsigned
int
noOfAPINodes
=
0
;
unsigned
int
noOfAPINodes
=
0
;
...
@@ -389,33 +390,28 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -389,33 +390,28 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
unsigned
int
noOfNodes
=
0
;
unsigned
int
noOfNodes
=
0
;
unsigned
int
noOfAttributes
=
0
;
unsigned
int
noOfAttributes
=
0
;
unsigned
int
noOfOperations
=
0
;
unsigned
int
noOfOperations
=
0
;
unsigned
int
noOfLocalOperations
=
0
;
unsigned
int
noOfTransactions
=
0
;
unsigned
int
noOfTransactions
=
0
;
unsigned
int
noOfIndexPages
=
0
;
unsigned
int
noOfIndexPages
=
0
;
unsigned
int
noOfDataPages
=
0
;
unsigned
int
noOfDataPages
=
0
;
unsigned
int
noOfScanRecords
=
0
;
unsigned
int
noOfScanRecords
=
0
;
unsigned
int
noOfLocalScanRecords
=
0
;
unsigned
int
noBatchSize
=
0
;
m_logLevel
=
new
LogLevel
();
m_logLevel
=
new
LogLevel
();
/**
* {"NoOfConcurrentCheckpointsDuringRestart", &cd.ispValues[1][5] },
* {"NoOfConcurrentCheckpointsAfterRestart", &cd.ispValues[2][4] },
* {"NoOfConcurrentProcessesHandleTakeover", &cd.ispValues[1][7] },
* {"TimeToWaitAlive", &cd.ispValues[0][0] },
*/
struct
AttribStorage
{
int
paramId
;
Uint32
*
storage
;
};
struct
AttribStorage
{
int
paramId
;
Uint32
*
storage
;
};
AttribStorage
tmp
[]
=
{
AttribStorage
tmp
[]
=
{
{
CFG_DB_NO_SCANS
,
&
noOfScanRecords
},
{
CFG_DB_NO_SCANS
,
&
noOfScanRecords
},
{
CFG_DB_NO_LOCAL_SCANS
,
&
noOfLocalScanRecords
},
{
CFG_DB_BATCH_SIZE
,
&
noBatchSize
},
{
CFG_DB_NO_TABLES
,
&
noOfTables
},
{
CFG_DB_NO_TABLES
,
&
noOfTables
},
{
CFG_DB_NO_INDEXES
,
&
noOfIndexes
},
{
CFG_DB_NO_ORDERED_INDEXES
,
&
noOfOrderedIndexes
},
{
CFG_DB_NO_UNIQUE_HASH_INDEXES
,
&
noOfUniqueHashIndexes
},
{
CFG_DB_NO_REPLICAS
,
&
noOfReplicas
},
{
CFG_DB_NO_REPLICAS
,
&
noOfReplicas
},
{
CFG_DB_NO_ATTRIBUTES
,
&
noOfAttributes
},
{
CFG_DB_NO_ATTRIBUTES
,
&
noOfAttributes
},
{
CFG_DB_NO_OPS
,
&
noOfOperations
},
{
CFG_DB_NO_OPS
,
&
noOfOperations
},
{
CFG_DB_NO_LOCAL_OPS
,
&
noOfLocalOperations
},
{
CFG_DB_NO_TRANSACTIONS
,
&
noOfTransactions
}
{
CFG_DB_NO_TRANSACTIONS
,
&
noOfTransactions
}
#if 0
{ "NoOfDiskPagesToDiskDuringRestartTUP", &cd.ispValues[3][8] },
{ "NoOfDiskPagesToDiskAfterRestartTUP", &cd.ispValues[3][9] },
{ "NoOfDiskPagesToDiskDuringRestartACC", &cd.ispValues[3][10] },
{ "NoOfDiskPagesToDiskAfterRestartACC", &cd.ispValues[3][11] },
#endif
};
};
ndb_mgm_configuration_iterator
db
(
*
(
ndb_mgm_configuration
*
)
ownConfig
,
0
);
ndb_mgm_configuration_iterator
db
(
*
(
ndb_mgm_configuration
*
)
ownConfig
,
0
);
...
@@ -514,31 +510,32 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -514,31 +510,32 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
*/
*/
ConfigValuesFactory
cfg
(
ownConfig
);
ConfigValuesFactory
cfg
(
ownConfig
);
noOfTables
++
;
// Remove impact of system table
noOfTables
+=
2
;
// Add System tables
noOfTables
+=
noOfIndexes
;
// Indexes are tables too
noOfAttributes
+=
5
;
// Add System table attributes
noOfAttributes
+=
2
;
// ---"----
noOfTables
*=
2
;
// Remove impact of Dict need 2 ids for each table
if
(
noOfDBNodes
>
15
)
{
if
(
noOfLocalScanRecords
==
0
)
{
noOfDBNodes
=
15
;
noOfLocalScanRecords
=
(
noOfDBNodes
*
noOfScanRecords
)
+
1
;
}
//if
}
Uint32
noOfLocalScanRecords
=
(
noOfDBNodes
*
noOfScanRecords
)
+
1
;
if
(
noOfLocalOperations
==
0
)
{
noOfLocalOperations
=
(
11
*
noOfOperations
)
/
10
;
}
Uint32
noOfTCScanRecords
=
noOfScanRecords
;
Uint32
noOfTCScanRecords
=
noOfScanRecords
;
{
{
Uint32
noOfAccTables
=
noOfTables
+
noOfUniqueHashIndexes
;
/**
/**
* Acc Size Alt values
* Acc Size Alt values
*/
*/
// Can keep 65536 pages (= 0.5 GByte)
// Can keep 65536 pages (= 0.5 GByte)
cfg
.
put
(
CFG_ACC_DIR_RANGE
,
cfg
.
put
(
CFG_ACC_DIR_RANGE
,
4
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
4
*
NO_OF_FRAG_PER_NODE
*
noOf
Acc
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_ACC_DIR_ARRAY
,
cfg
.
put
(
CFG_ACC_DIR_ARRAY
,
(
noOfIndexPages
>>
8
)
+
(
noOfIndexPages
>>
8
)
+
4
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
4
*
NO_OF_FRAG_PER_NODE
*
noOf
Acc
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_ACC_FRAGMENT
,
cfg
.
put
(
CFG_ACC_FRAGMENT
,
2
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
2
*
NO_OF_FRAG_PER_NODE
*
noOf
Acc
Tables
*
noOfReplicas
);
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
// The extra operation records added are used by the scan and node
// The extra operation records added are used by the scan and node
...
@@ -548,25 +545,27 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -548,25 +545,27 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
// The remainder are allowed for use by the scan processes.
// The remainder are allowed for use by the scan processes.
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
cfg
.
put
(
CFG_ACC_OP_RECS
,
cfg
.
put
(
CFG_ACC_OP_RECS
,
(
(
11
*
noOfOperations
)
/
10
+
50
)
+
(
noOfLocalOperations
+
50
)
+
(
noOfLocalScanRecords
*
MAX_PARALLEL_SCANS_PER_FRAG
)
+
(
noOfLocalScanRecords
*
noBatchSize
)
+
NODE_RECOVERY_SCAN_OP_RECORDS
);
NODE_RECOVERY_SCAN_OP_RECORDS
);
cfg
.
put
(
CFG_ACC_OVERFLOW_RECS
,
cfg
.
put
(
CFG_ACC_OVERFLOW_RECS
,
noOfIndexPages
+
noOfIndexPages
+
2
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
2
*
NO_OF_FRAG_PER_NODE
*
noOf
Acc
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_ACC_PAGE8
,
cfg
.
put
(
CFG_ACC_PAGE8
,
noOfIndexPages
+
32
);
noOfIndexPages
+
32
);
cfg
.
put
(
CFG_ACC_ROOT_FRAG
,
cfg
.
put
(
CFG_ACC_ROOT_FRAG
,
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
NO_OF_FRAG_PER_NODE
*
noOf
Acc
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_ACC_TABLE
,
noOfTables
);
cfg
.
put
(
CFG_ACC_TABLE
,
noOf
Acc
Tables
);
cfg
.
put
(
CFG_ACC_SCAN
,
noOfLocalScanRecords
);
cfg
.
put
(
CFG_ACC_SCAN
,
noOfLocalScanRecords
);
}
}
Uint32
noOfMetaTables
=
noOfTables
+
noOfOrderedIndexes
+
noOfUniqueHashIndexes
;
{
{
/**
/**
* Dict Size Alt values
* Dict Size Alt values
...
@@ -575,7 +574,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -575,7 +574,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
noOfAttributes
);
noOfAttributes
);
cfg
.
put
(
CFG_DICT_TABLE
,
cfg
.
put
(
CFG_DICT_TABLE
,
noOfTables
);
noOf
Meta
Tables
);
}
}
{
{
...
@@ -589,7 +588,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -589,7 +588,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
noOfOperations
+
noOfTransactions
+
46
);
noOfOperations
+
noOfTransactions
+
46
);
cfg
.
put
(
CFG_DIH_FRAG_CONNECT
,
cfg
.
put
(
CFG_DIH_FRAG_CONNECT
,
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfDBNodes
);
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfDBNodes
);
int
temp
;
int
temp
;
temp
=
noOfReplicas
-
2
;
temp
=
noOfReplicas
-
2
;
...
@@ -599,14 +598,14 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -599,14 +598,14 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
temp
++
;
temp
++
;
cfg
.
put
(
CFG_DIH_MORE_NODES
,
cfg
.
put
(
CFG_DIH_MORE_NODES
,
temp
*
NO_OF_FRAG_PER_NODE
*
temp
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfDBNodes
);
noOf
Meta
Tables
*
noOfDBNodes
);
cfg
.
put
(
CFG_DIH_REPLICAS
,
cfg
.
put
(
CFG_DIH_REPLICAS
,
NO_OF_FRAG_PER_NODE
*
noOfTables
*
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfDBNodes
*
noOfReplicas
);
noOfDBNodes
*
noOfReplicas
);
cfg
.
put
(
CFG_DIH_TABLE
,
cfg
.
put
(
CFG_DIH_TABLE
,
noOfTables
);
noOf
Meta
Tables
);
}
}
{
{
...
@@ -614,13 +613,13 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -614,13 +613,13 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
* Lqh Size Alt values
* Lqh Size Alt values
*/
*/
cfg
.
put
(
CFG_LQH_FRAG
,
cfg
.
put
(
CFG_LQH_FRAG
,
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_LQH_TABLE
,
cfg
.
put
(
CFG_LQH_TABLE
,
noOfTables
);
noOf
Meta
Tables
);
cfg
.
put
(
CFG_LQH_TC_CONNECT
,
cfg
.
put
(
CFG_LQH_TC_CONNECT
,
(
11
*
noOfOperations
)
/
10
+
50
);
noOfLocalOperations
+
50
);
cfg
.
put
(
CFG_LQH_SCAN
,
cfg
.
put
(
CFG_LQH_SCAN
,
noOfLocalScanRecords
);
noOfLocalScanRecords
);
...
@@ -637,7 +636,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -637,7 +636,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
(
2
*
noOfOperations
)
+
16
+
noOfTransactions
);
(
2
*
noOfOperations
)
+
16
+
noOfTransactions
);
cfg
.
put
(
CFG_TC_TABLE
,
cfg
.
put
(
CFG_TC_TABLE
,
noOfTables
);
noOf
Meta
Tables
);
cfg
.
put
(
CFG_TC_LOCAL_SCAN
,
cfg
.
put
(
CFG_TC_LOCAL_SCAN
,
noOfLocalScanRecords
);
noOfLocalScanRecords
);
...
@@ -651,23 +650,23 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -651,23 +650,23 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
* Tup Size Alt values
* Tup Size Alt values
*/
*/
cfg
.
put
(
CFG_TUP_FRAG
,
cfg
.
put
(
CFG_TUP_FRAG
,
2
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
2
*
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_TUP_OP_RECS
,
cfg
.
put
(
CFG_TUP_OP_RECS
,
(
11
*
noOfOperations
)
/
10
+
50
);
noOfLocalOperations
+
50
);
cfg
.
put
(
CFG_TUP_PAGE
,
cfg
.
put
(
CFG_TUP_PAGE
,
noOfDataPages
);
noOfDataPages
);
cfg
.
put
(
CFG_TUP_PAGE_RANGE
,
cfg
.
put
(
CFG_TUP_PAGE_RANGE
,
4
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
4
*
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_TUP_TABLE
,
cfg
.
put
(
CFG_TUP_TABLE
,
noOfTables
);
noOf
Meta
Tables
);
cfg
.
put
(
CFG_TUP_TABLE_DESC
,
cfg
.
put
(
CFG_TUP_TABLE_DESC
,
4
*
NO_OF_FRAG_PER_NODE
*
noOfAttributes
*
noOfReplicas
+
4
*
NO_OF_FRAG_PER_NODE
*
noOfAttributes
*
noOfReplicas
+
12
*
NO_OF_FRAG_PER_NODE
*
noOfTables
*
noOfReplicas
);
12
*
NO_OF_FRAG_PER_NODE
*
noOf
Meta
Tables
*
noOfReplicas
);
cfg
.
put
(
CFG_TUP_STORED_PROC
,
cfg
.
put
(
CFG_TUP_STORED_PROC
,
noOfLocalScanRecords
);
noOfLocalScanRecords
);
...
@@ -678,13 +677,13 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
...
@@ -678,13 +677,13 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
* Tux Size Alt values
* Tux Size Alt values
*/
*/
cfg
.
put
(
CFG_TUX_INDEX
,
cfg
.
put
(
CFG_TUX_INDEX
,
noOf
Tabl
es
);
noOf
OrderedIndex
es
);
cfg
.
put
(
CFG_TUX_FRAGMENT
,
cfg
.
put
(
CFG_TUX_FRAGMENT
,
2
*
NO_OF_FRAG_PER_NODE
*
noOf
Tabl
es
*
noOfReplicas
);
2
*
NO_OF_FRAG_PER_NODE
*
noOf
OrderedIndex
es
*
noOfReplicas
);
cfg
.
put
(
CFG_TUX_ATTRIBUTE
,
cfg
.
put
(
CFG_TUX_ATTRIBUTE
,
noOfIndexes
*
4
);
noOf
Ordered
Indexes
*
4
);
cfg
.
put
(
CFG_TUX_SCAN_OP
,
noOfLocalScanRecords
);
cfg
.
put
(
CFG_TUX_SCAN_OP
,
noOfLocalScanRecords
);
}
}
...
...
ndb/src/kernel/vm/pc.hpp
View file @
7c1eb264
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
// in future version since small tables want small value and large tables
// in future version since small tables want small value and large tables
// need large value.
// need large value.
/* ------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------- */
#define NO_OF_FRAG_PER_NODE
8
#define NO_OF_FRAG_PER_NODE
1
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
// 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment