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
5a9168ed
Commit
5a9168ed
authored
Feb 10, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-new
parents
27a0d35c
3e312142
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+4
-3
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+17
-11
No files found.
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
View file @
5a9168ed
...
...
@@ -775,7 +775,7 @@ private:
//------------------------------------
// Methods for LCP functionality
//------------------------------------
void
checkKeepGci
(
Uint32
replicaStartIndex
);
void
checkKeepGci
(
TabRecordPtr
,
Uint32
,
Fragmentstore
*
,
Uint32
);
void
checkLcpStart
(
Signal
*
,
Uint32
lineNo
);
void
checkStartMoreLcp
(
Signal
*
,
Uint32
nodeId
);
bool
reportLcpCompletion
(
const
class
LcpFragRep
*
);
...
...
@@ -1300,7 +1300,7 @@ private:
}
Uint32
lcpStart
;
Uint32
lcpSt
art
Gcp
;
Uint32
lcpSt
op
Gcp
;
Uint32
keepGci
;
/* USED TO CALCULATE THE GCI TO KEEP AFTER A LCP */
Uint32
oldestRestorableGci
;
...
...
@@ -1369,7 +1369,8 @@ private:
Uint32
cstarttype
;
Uint32
csystemnodes
;
Uint32
currentgcp
;
Uint32
c_newest_restorable_gci
;
enum
GcpMasterTakeOverState
{
GMTOS_IDLE
=
0
,
GMTOS_INITIAL
=
1
,
...
...
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
5a9168ed
...
...
@@ -685,6 +685,7 @@ void Dbdih::execCOPY_GCIREQ(Signal* signal)
jam
();
coldgcp
=
SYSFILE
->
newestRestorableGCI
;
crestartGci
=
SYSFILE
->
newestRestorableGCI
;
c_newest_restorable_gci
=
SYSFILE
->
newestRestorableGCI
;
Sysfile
::
setRestartOngoing
(
SYSFILE
->
systemRestartBits
);
currentgcp
=
coldgcp
+
1
;
cnewgcp
=
coldgcp
+
1
;
...
...
@@ -703,6 +704,7 @@ void Dbdih::execCOPY_GCIREQ(Signal* signal)
ok
=
true
;
jam
();
cgcpParticipantState
=
GCP_PARTICIPANT_COPY_GCI_RECEIVED
;
c_newest_restorable_gci
=
SYSFILE
->
newestRestorableGCI
;
setNodeInfo
(
signal
);
break
;
}
//if
...
...
@@ -8039,6 +8041,8 @@ void Dbdih::execCOPY_GCICONF(Signal* signal)
signal
->
theData
[
1
]
=
coldgcp
;
sendSignal
(
CMVMI_REF
,
GSN_EVENT_REP
,
signal
,
2
,
JBB
);
c_newest_restorable_gci
=
coldgcp
;
CRASH_INSERTION
(
7004
);
emptyWaitGCPMasterQueue
(
signal
);
cgcpStatus
=
GCP_READY
;
...
...
@@ -9522,7 +9526,7 @@ void Dbdih::checkTcCounterLab(Signal* signal)
}
//if
c_lcpState
.
ctimer
+=
32
;
if
((
c_nodeStartMaster
.
blockLcp
==
true
)
||
(
(
c_lcpState
.
lcpStartGcp
+
1
)
>
currentgcp
))
{
(
c_lcpState
.
lcpStopGcp
>=
c_newest_restorable_gci
))
{
jam
();
/* --------------------------------------------------------------------- */
// No reason to start juggling the states and checking for start of LCP if
...
...
@@ -9605,7 +9609,6 @@ void Dbdih::execTCGETOPSIZECONF(Signal* signal)
/* ----------------------------------------------------------------------- */
c_lcpState
.
ctimer
=
0
;
c_lcpState
.
keepGci
=
coldgcp
;
c_lcpState
.
lcpStartGcp
=
currentgcp
;
/* ----------------------------------------------------------------------- */
/* UPDATE THE NEW LATEST LOCAL CHECKPOINT ID. */
/* ----------------------------------------------------------------------- */
...
...
@@ -9677,7 +9680,7 @@ void Dbdih::calculateKeepGciLab(Signal* signal, Uint32 tableId, Uint32 fragId)
cnoOfActiveTables
++
;
FragmentstorePtr
fragPtr
;
getFragstore
(
tabPtr
.
p
,
fragId
,
fragPtr
);
checkKeepGci
(
fragPtr
.
p
->
storedReplicas
);
checkKeepGci
(
tabPtr
,
fragId
,
fragPtr
.
p
,
fragPtr
.
p
->
storedReplicas
);
fragId
++
;
if
(
fragId
>=
tabPtr
.
p
->
totalfragments
)
{
jam
();
...
...
@@ -10537,6 +10540,7 @@ void Dbdih::allNodesLcpCompletedLab(Signal* signal)
signal
->
theData
[
0
]
=
NDB_LE_LocalCheckpointCompleted
;
//Event type
signal
->
theData
[
1
]
=
SYSFILE
->
latestLCP_ID
;
sendSignal
(
CMVMI_REF
,
GSN_EVENT_REP
,
signal
,
2
,
JBB
);
c_lcpState
.
lcpStopGcp
=
c_newest_restorable_gci
;
/**
* Start checking for next LCP
...
...
@@ -10971,7 +10975,8 @@ void Dbdih::checkEscalation()
/* DESCRIPTION: CHECK FOR MINIMUM GCI RESTORABLE WITH NEW LOCAL */
/* CHECKPOINT. */
/*************************************************************************/
void
Dbdih
::
checkKeepGci
(
Uint32
replicaStartIndex
)
void
Dbdih
::
checkKeepGci
(
TabRecordPtr
tabPtr
,
Uint32
fragId
,
Fragmentstore
*
,
Uint32
replicaStartIndex
)
{
ReplicaRecordPtr
ckgReplicaPtr
;
ckgReplicaPtr
.
i
=
replicaStartIndex
;
...
...
@@ -10993,7 +10998,6 @@ void Dbdih::checkKeepGci(Uint32 replicaStartIndex)
if
(
oldestRestorableGci
>
c_lcpState
.
oldestRestorableGci
)
{
jam
();
c_lcpState
.
oldestRestorableGci
=
oldestRestorableGci
;
ndbrequire
(((
int
)
c_lcpState
.
oldestRestorableGci
)
>=
0
);
}
//if
ckgReplicaPtr
.
i
=
ckgReplicaPtr
.
p
->
nextReplica
;
}
//while
...
...
@@ -11287,7 +11291,7 @@ void Dbdih::findMinGci(ReplicaRecordPtr fmgReplicaPtr,
do
{
ndbrequire
(
lcpNo
<
MAX_LCP_STORED
);
if
(
fmgReplicaPtr
.
p
->
lcpStatus
[
lcpNo
]
==
ZVALID
&&
fmgReplicaPtr
.
p
->
maxGciStarted
[
lcpNo
]
<
=
coldgcp
)
fmgReplicaPtr
.
p
->
maxGciStarted
[
lcpNo
]
<
c_newest_restorable_gci
)
{
jam
();
keepGci
=
fmgReplicaPtr
.
p
->
maxGciCompleted
[
lcpNo
];
...
...
@@ -11409,7 +11413,7 @@ void Dbdih::initCommonData()
c_lcpState
.
clcpDelay
=
0
;
c_lcpState
.
lcpStart
=
ZIDLE
;
c_lcpState
.
lcpSt
art
Gcp
=
0
;
c_lcpState
.
lcpSt
op
Gcp
=
0
;
c_lcpState
.
setLcpStatus
(
LCP_STATUS_IDLE
,
__LINE__
);
c_lcpState
.
currentFragment
.
tableId
=
0
;
c_lcpState
.
currentFragment
.
fragmentId
=
0
;
...
...
@@ -11446,6 +11450,7 @@ void Dbdih::initCommonData()
csystemnodes
=
0
;
c_updateToLock
=
RNIL
;
currentgcp
=
0
;
c_newest_restorable_gci
=
0
;
cverifyQueueCounter
=
0
;
cwaitLcpSr
=
false
;
c_nextLogPart
=
0
;
...
...
@@ -11522,6 +11527,7 @@ void Dbdih::initRestartInfo()
currentgcp
=
2
;
cnewgcp
=
2
;
crestartGci
=
1
;
c_newest_restorable_gci
=
1
;
SYSFILE
->
keepGCI
=
1
;
SYSFILE
->
oldestRestorableGCI
=
1
;
...
...
@@ -13494,9 +13500,9 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
if
(
signal
->
theData
[
0
]
==
7001
)
{
infoEvent
(
"c_lcpState.keepGci = %d"
,
c_lcpState
.
keepGci
);
infoEvent
(
"c_lcpState.lcpStatus = %d, clcpSt
art
Gcp = %d"
,
infoEvent
(
"c_lcpState.lcpStatus = %d, clcpSt
op
Gcp = %d"
,
c_lcpState
.
lcpStatus
,
c_lcpState
.
lcpSt
art
Gcp
);
c_lcpState
.
lcpSt
op
Gcp
);
infoEvent
(
"cgcpStartCounter = %d, cimmediateLcpStart = %d"
,
cgcpStartCounter
,
c_lcpState
.
immediateLcpStart
);
}
//if
...
...
@@ -13677,8 +13683,8 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
infoEvent
(
"lcpStatus = %d (update place = %d) "
,
c_lcpState
.
lcpStatus
,
c_lcpState
.
lcpStatusUpdatedPlace
);
infoEvent
(
"lcpStart = %d lcpSt
art
Gcp = %d keepGci = %d oldestRestorable = %d"
,
c_lcpState
.
lcpStart
,
c_lcpState
.
lcpSt
art
Gcp
,
(
"lcpStart = %d lcpSt
op
Gcp = %d keepGci = %d oldestRestorable = %d"
,
c_lcpState
.
lcpStart
,
c_lcpState
.
lcpSt
op
Gcp
,
c_lcpState
.
keepGci
,
c_lcpState
.
oldestRestorableGci
);
infoEvent
...
...
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