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
f2f90009
Commit
f2f90009
authored
Aug 15, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#4970
parent
a2b96f3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
ndb/src/common/mgmcommon/ConfigInfo.cpp
ndb/src/common/mgmcommon/ConfigInfo.cpp
+30
-0
No files found.
ndb/src/common/mgmcommon/ConfigInfo.cpp
View file @
f2f90009
...
...
@@ -154,11 +154,15 @@ bool add_node_connections(Vector<ConfigInfo::ConfigRuleSection>§ions,
bool
add_server_ports
(
Vector
<
ConfigInfo
::
ConfigRuleSection
>&
sections
,
struct
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
rule_data
);
bool
check_node_vs_replicas
(
Vector
<
ConfigInfo
::
ConfigRuleSection
>&
sections
,
struct
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
rule_data
);
const
ConfigInfo
::
ConfigRule
ConfigInfo
::
m_ConfigRules
[]
=
{
{
add_node_connections
,
0
},
{
add_server_ports
,
0
},
{
check_node_vs_replicas
,
0
},
{
0
,
0
}
};
...
...
@@ -2197,6 +2201,13 @@ transformNode(InitConfigFileParser::Context & ctx, const char * data){
ctx
.
m_userProperties
.
get
(
"NoOfNodes"
,
&
nodes
);
ctx
.
m_userProperties
.
put
(
"NoOfNodes"
,
++
nodes
,
true
);
/**
* Update count (per type)
*/
nodes
=
0
;
ctx
.
m_userProperties
.
get
(
ctx
.
fname
,
&
nodes
);
ctx
.
m_userProperties
.
put
(
ctx
.
fname
,
++
nodes
,
true
);
return
true
;
}
...
...
@@ -2991,6 +3002,7 @@ add_node_connections(Vector<ConfigInfo::ConfigRuleSection>§ions,
return
true
;
}
bool
add_server_ports
(
Vector
<
ConfigInfo
::
ConfigRuleSection
>&
sections
,
struct
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
rule_data
)
...
...
@@ -3030,4 +3042,22 @@ bool add_server_ports(Vector<ConfigInfo::ConfigRuleSection>§ions,
return
true
;
}
bool
check_node_vs_replicas
(
Vector
<
ConfigInfo
::
ConfigRuleSection
>&
sections
,
struct
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
rule_data
)
{
Uint32
db_nodes
=
0
;
Uint32
replicas
=
0
;
ctx
.
m_userProperties
.
get
(
"DB"
,
&
db_nodes
);
ctx
.
m_userProperties
.
get
(
"NoOfReplicas"
,
&
replicas
);
if
((
db_nodes
%
replicas
)
!=
0
){
ctx
.
reportError
(
"Invalid no of db nodes wrt no of replicas.
\n
"
"No of nodes must be dividable with no or replicas"
);
return
false
;
}
return
true
;
}
template
class
Vector
<
ConfigInfo
::
ConfigRuleSection
>;
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