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
49d87c7e
Commit
49d87c7e
authored
Sep 26, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#15303
Fix take-over during SR, remove coupling to lcp/gcp (if systemRestartOngoing())
parent
1c7a4620
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
+30
-7
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+30
-7
No files found.
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
49d87c7e
...
@@ -1265,9 +1265,9 @@ void Dbdih::execNDB_STTOR(Signal* signal)
...
@@ -1265,9 +1265,9 @@ void Dbdih::execNDB_STTOR(Signal* signal)
if
(
isMaster
())
{
if
(
isMaster
())
{
jam
();
jam
();
systemRestartTakeOverLab
(
signal
);
systemRestartTakeOverLab
(
signal
);
if
(
anyActiveTakeOver
()
&&
false
)
{
if
(
anyActiveTakeOver
())
{
jam
();
jam
();
ndbout_c
(
"1 - anyActiveTakeOver == true"
);
return
;
return
;
}
}
}
}
...
@@ -2260,6 +2260,8 @@ Dbdih::systemRestartTakeOverLab(Signal* signal)
...
@@ -2260,6 +2260,8 @@ Dbdih::systemRestartTakeOverLab(Signal* signal)
// NOT ACTIVE NODES THAT HAVE NOT YET BEEN TAKEN OVER NEEDS TAKE OVER
// NOT ACTIVE NODES THAT HAVE NOT YET BEEN TAKEN OVER NEEDS TAKE OVER
// IMMEDIATELY. IF WE ARE ALIVE WE TAKE OVER OUR OWN NODE.
// IMMEDIATELY. IF WE ARE ALIVE WE TAKE OVER OUR OWN NODE.
/*-------------------------------------------------------------------*/
/*-------------------------------------------------------------------*/
infoEvent
(
"Take over of node %d started"
,
nodePtr
.
i
);
startTakeOver
(
signal
,
RNIL
,
nodePtr
.
i
,
nodePtr
.
i
);
startTakeOver
(
signal
,
RNIL
,
nodePtr
.
i
,
nodePtr
.
i
);
}
//if
}
//if
break
;
break
;
...
@@ -2372,6 +2374,12 @@ void Dbdih::nodeRestartTakeOver(Signal* signal, Uint32 startNodeId)
...
@@ -2372,6 +2374,12 @@ void Dbdih::nodeRestartTakeOver(Signal* signal, Uint32 startNodeId)
*--------------------------------------------------------------------*/
*--------------------------------------------------------------------*/
Uint32
takeOverNode
=
Sysfile
::
getTakeOverNode
(
startNodeId
,
Uint32
takeOverNode
=
Sysfile
::
getTakeOverNode
(
startNodeId
,
SYSFILE
->
takeOver
);
SYSFILE
->
takeOver
);
if
(
takeOverNode
==
0
){
jam
();
warningEvent
(
"Bug in take-over code restarting"
);
takeOverNode
=
startNodeId
;
}
startTakeOver
(
signal
,
RNIL
,
startNodeId
,
takeOverNode
);
startTakeOver
(
signal
,
RNIL
,
startNodeId
,
takeOverNode
);
break
;
break
;
}
}
...
@@ -2525,7 +2533,14 @@ void Dbdih::startTakeOver(Signal* signal,
...
@@ -2525,7 +2533,14 @@ void Dbdih::startTakeOver(Signal* signal,
Sysfile
::
setTakeOverNode
(
takeOverPtr
.
p
->
toFailedNode
,
SYSFILE
->
takeOver
,
Sysfile
::
setTakeOverNode
(
takeOverPtr
.
p
->
toFailedNode
,
SYSFILE
->
takeOver
,
startNode
);
startNode
);
takeOverPtr
.
p
->
toMasterStatus
=
TakeOverRecord
::
TO_START_COPY
;
takeOverPtr
.
p
->
toMasterStatus
=
TakeOverRecord
::
TO_START_COPY
;
if
(
getNodeState
().
getSystemRestartInProgress
())
{
jam
();
checkToCopy
();
checkToCopyCompleted
(
signal
);
return
;
}
cstartGcpNow
=
true
;
cstartGcpNow
=
true
;
}
//Dbdih::startTakeOver()
}
//Dbdih::startTakeOver()
...
@@ -3273,6 +3288,18 @@ void Dbdih::toCopyCompletedLab(Signal * signal, TakeOverRecordPtr takeOverPtr)
...
@@ -3273,6 +3288,18 @@ void Dbdih::toCopyCompletedLab(Signal * signal, TakeOverRecordPtr takeOverPtr)
signal
->
theData
[
1
]
=
takeOverPtr
.
p
->
toStartingNode
;
signal
->
theData
[
1
]
=
takeOverPtr
.
p
->
toStartingNode
;
sendSignal
(
CMVMI_REF
,
GSN_EVENT_REP
,
signal
,
2
,
JBB
);
sendSignal
(
CMVMI_REF
,
GSN_EVENT_REP
,
signal
,
2
,
JBB
);
if
(
getNodeState
().
getSystemRestartInProgress
())
{
jam
();
infoEvent
(
"Take over of node %d complete"
,
takeOverPtr
.
p
->
toStartingNode
);
setNodeActiveStatus
(
takeOverPtr
.
p
->
toStartingNode
,
Sysfile
::
NS_Active
);
takeOverPtr
.
p
->
toMasterStatus
=
TakeOverRecord
::
WAIT_LCP
;
takeOverCompleted
(
takeOverPtr
.
p
->
toStartingNode
);
checkToCopy
();
checkToCopyCompleted
(
signal
);
return
;
}
c_lcpState
.
immediateLcpStart
=
true
;
c_lcpState
.
immediateLcpStart
=
true
;
takeOverPtr
.
p
->
toMasterStatus
=
TakeOverRecord
::
WAIT_LCP
;
takeOverPtr
.
p
->
toMasterStatus
=
TakeOverRecord
::
WAIT_LCP
;
...
@@ -3379,16 +3406,12 @@ void Dbdih::execEND_TOCONF(Signal* signal)
...
@@ -3379,16 +3406,12 @@ void Dbdih::execEND_TOCONF(Signal* signal)
}
//if
}
//if
endTakeOver
(
takeOverPtr
.
i
);
endTakeOver
(
takeOverPtr
.
i
);
ndbout_c
(
"2 - endTakeOver"
);
if
(
cstartPhase
==
ZNDB_SPH4
)
{
if
(
cstartPhase
==
ZNDB_SPH4
)
{
jam
();
jam
();
ndbrequire
(
false
);
if
(
anyActiveTakeOver
())
{
if
(
anyActiveTakeOver
())
{
jam
();
jam
();
ndbout_c
(
"4 - anyActiveTakeOver == true"
);
return
;
return
;
}
//if
}
//if
ndbout_c
(
"5 - anyActiveTakeOver == false -> ndbsttorry10Lab"
);
ndbsttorry10Lab
(
signal
,
__LINE__
);
ndbsttorry10Lab
(
signal
,
__LINE__
);
return
;
return
;
}
//if
}
//if
...
...
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