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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c54681a4
Commit
c54681a4
authored
Jun 26, 2007
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
parents
ef74a65c
2411cbee
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
176 additions
and
39 deletions
+176
-39
storage/ndb/src/kernel/blocks/ERROR_codes.txt
storage/ndb/src/kernel/blocks/ERROR_codes.txt
+5
-1
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+1
-1
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+160
-36
storage/ndb/src/kernel/blocks/pgman.cpp
storage/ndb/src/kernel/blocks/pgman.cpp
+10
-1
No files found.
storage/ndb/src/kernel/blocks/ERROR_codes.txt
View file @
c54681a4
...
...
@@ -5,7 +5,7 @@ Next DBACC 3002
Next DBTUP 4029
Next DBLQH 5045
Next DBDICT 6008
Next DBDIH 718
4
Next DBDIH 718
6
Next DBTC 8040
Next CMVMI 9000
Next BACKUP 10038
...
...
@@ -77,6 +77,10 @@ Delay GCP_SAVEREQ by 10 secs
7183: Crash when receiving COPY_GCIREQ
7184: Crash before starting next GCP after a node failure
7185: Dont reply to COPY_GCI_REQ where reason == GCP
ERROR CODES FOR TESTING NODE FAILURE, LOCAL CHECKPOINT HANDLING:
-----------------------------------------------------------------
...
...
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
View file @
c54681a4
...
...
@@ -898,7 +898,7 @@ private:
void
ndbsttorry10Lab
(
Signal
*
,
Uint32
_line
);
void
createMutexes
(
Signal
*
signal
,
Uint32
no
);
void
createMutex_done
(
Signal
*
signal
,
Uint32
no
,
Uint32
retVal
);
void
crashSystemAtGcpStop
(
Signal
*
);
void
crashSystemAtGcpStop
(
Signal
*
,
bool
);
void
sendFirstDictfragsreq
(
Signal
*
,
TabRecordPtr
regTabPtr
);
void
addtabrefuseLab
(
Signal
*
,
ConnectRecordPtr
regConnectPtr
,
Uint32
errorCode
);
void
GCP_SAVEhandling
(
Signal
*
,
Uint32
nodeId
);
...
...
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
c54681a4
...
...
@@ -749,6 +749,12 @@ done:
CRASH_INSERTION
(
7183
);
if
(
ERROR_INSERTED
(
7185
)
&&
reason
==
CopyGCIReq
::
GLOBAL_CHECKPOINT
)
{
jam
();
return
;
}
/* ----------------------------------------------------------------------- */
/* WE START BY TRYING TO OPEN THE FIRST RESTORABLE GCI FILE. */
/* ----------------------------------------------------------------------- */
...
...
@@ -4152,6 +4158,11 @@ void Dbdih::execNODE_FAILREP(Signal* signal)
CLEAR_ERROR_INSERT_VALUE
;
}
if
(
ERROR_INSERTED
(
7184
))
{
SET_ERROR_INSERT_VALUE
(
7000
);
}
/*-------------------------------------------------------------------------*/
// The first step is to convert from a bit mask to an array of failed nodes.
/*-------------------------------------------------------------------------*/
...
...
@@ -7826,7 +7837,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
g_eventLogger
.
error
(
"System crash due to GCP Stop in state = %u"
,
(
Uint32
)
cgcpStatus
);
#endif
crashSystemAtGcpStop
(
signal
);
crashSystemAtGcpStop
(
signal
,
false
);
return
;
}
//if
}
else
{
...
...
@@ -7840,7 +7851,7 @@ void Dbdih::checkGcpStopLab(Signal* signal)
g_eventLogger
.
error
(
"System crash due to GCP Stop in state = %u"
,
(
Uint32
)
cgcpStatus
);
#endif
crashSystemAtGcpStop
(
signal
);
crashSystemAtGcpStop
(
signal
,
false
);
return
;
}
//if
}
else
{
...
...
@@ -11196,37 +11207,128 @@ void Dbdih::tableCloseLab(Signal* signal, FileRecordPtr filePtr)
* GCP stop detected,
* send SYSTEM_ERROR to all other alive nodes
*/
void
Dbdih
::
crashSystemAtGcpStop
(
Signal
*
signal
)
void
Dbdih
::
crashSystemAtGcpStop
(
Signal
*
signal
,
bool
local
)
{
if
(
local
)
goto
dolocal
;
switch
(
cgcpStatus
){
case
GCP_PREPARE_SENT
:
{
jam
();
/**
* We're waiting for a GCP PREPARE CONF
*/
infoEvent
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_PREPARE_Counter
.
getText
());
ndbout_c
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_PREPARE_Counter
.
getText
());
{
NodeReceiverGroup
rg
(
DBDIH
,
c_GCP_PREPARE_Counter
);
signal
->
theData
[
0
]
=
7022
;
sendSignal
(
rg
,
GSN_DUMP_STATE_ORD
,
signal
,
1
,
JBA
);
}
{
NodeReceiverGroup
rg
(
NDBCNTR
,
c_GCP_PREPARE_Counter
);
SystemError
*
const
sysErr
=
(
SystemError
*
)
&
signal
->
theData
[
0
];
sysErr
->
errorCode
=
SystemError
::
GCPStopDetected
;
sysErr
->
errorRef
=
reference
();
sysErr
->
data1
=
cgcpStatus
;
sysErr
->
data2
=
cgcpOrderBlocked
;
sendSignal
(
rg
,
GSN_SYSTEM_ERROR
,
signal
,
SystemError
::
SignalLength
,
JBA
);
}
ndbrequire
(
!
c_GCP_PREPARE_Counter
.
done
());
return
;
}
case
GCP_COMMIT_SENT
:
{
jam
();
/**
* We're waiting for a GCP_NODEFINISH
*/
infoEvent
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_COMMIT_Counter
.
getText
());
ndbout_c
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_COMMIT_Counter
.
getText
());
{
NodeReceiverGroup
rg
(
DBDIH
,
c_GCP_COMMIT_Counter
);
signal
->
theData
[
0
]
=
7022
;
sendSignal
(
rg
,
GSN_DUMP_STATE_ORD
,
signal
,
1
,
JBA
);
}
{
NodeReceiverGroup
rg
(
NDBCNTR
,
c_GCP_COMMIT_Counter
);
SystemError
*
const
sysErr
=
(
SystemError
*
)
&
signal
->
theData
[
0
];
sysErr
->
errorCode
=
SystemError
::
GCPStopDetected
;
sysErr
->
errorRef
=
reference
();
sysErr
->
data1
=
cgcpStatus
;
sysErr
->
data2
=
cgcpOrderBlocked
;
sendSignal
(
rg
,
GSN_SYSTEM_ERROR
,
signal
,
SystemError
::
SignalLength
,
JBA
);
}
ndbrequire
(
!
c_GCP_COMMIT_Counter
.
done
());
return
;
}
case
GCP_NODE_FINISHED
:
{
jam
();
/**
* We're waiting for a GCP save conf
*/
ndbrequire
(
!
c_GCP_SAVEREQ_Counter
.
done
());
NodeReceiverGroup
rg
(
DBLQH
,
c_GCP_SAVEREQ_Counter
);
signal
->
theData
[
0
]
=
2305
;
sendSignal
(
rg
,
GSN_DUMP_STATE_ORD
,
signal
,
1
,
JBB
);
infoEvent
(
"Detected GCP stop...sending kill to %s"
,
c_GCP_SAVEREQ_Counter
.
getText
());
g_eventLogger
.
error
(
"Detected GCP stop...sending kill to %s"
,
c_GCP_SAVEREQ_Counter
.
getText
());
infoEvent
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_SAVEREQ_Counter
.
getText
());
ndbout_c
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_GCP_SAVEREQ_Counter
.
getText
());
ndbrequire
(
!
c_GCP_SAVEREQ_Counter
.
done
());
return
;
}
case
GCP_SAVE_LQH_FINISHED
:
g_eventLogger
.
error
(
"m_copyReason: %d m_waiting: %d"
,
{
jam
();
/**
* We're waiting for a COPY_GCICONF
*/
infoEvent
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_COPY_GCIREQ_Counter
.
getText
());
ndbout_c
(
"Detected GCP stop(%d)...sending kill to %s"
,
cgcpStatus
,
c_COPY_GCIREQ_Counter
.
getText
());
{
NodeReceiverGroup
rg
(
DBDIH
,
c_COPY_GCIREQ_Counter
);
signal
->
theData
[
0
]
=
7022
;
sendSignal
(
rg
,
GSN_DUMP_STATE_ORD
,
signal
,
1
,
JBA
);
}
{
NodeReceiverGroup
rg
(
NDBCNTR
,
c_COPY_GCIREQ_Counter
);
SystemError
*
const
sysErr
=
(
SystemError
*
)
&
signal
->
theData
[
0
];
sysErr
->
errorCode
=
SystemError
::
GCPStopDetected
;
sysErr
->
errorRef
=
reference
();
sysErr
->
data1
=
cgcpStatus
;
sysErr
->
data2
=
cgcpOrderBlocked
;
sendSignal
(
rg
,
GSN_SYSTEM_ERROR
,
signal
,
SystemError
::
SignalLength
,
JBA
);
}
ndbrequire
(
!
c_COPY_GCIREQ_Counter
.
done
());
return
;
}
case
GCP_READY
:
(
void
)
1
;
}
dolocal:
ndbout_c
(
"m_copyReason: %d m_waiting: %d"
,
c_copyGCIMaster
.
m_copyReason
,
c_copyGCIMaster
.
m_waiting
);
break
;
case
GCP_READY
:
// shut up lint
case
GCP_PREPARE_SENT
:
case
GCP_COMMIT_SENT
:
break
;
}
g_eventLogger
.
error
(
"c_copyGCISlave: sender{Data, Ref} %d %x reason: %d nextWord: %d"
,
ndbout_c
(
"c_copyGCISlave: sender{Data, Ref} %d %x reason: %d nextWord: %d"
,
c_copyGCISlave
.
m_senderData
,
c_copyGCISlave
.
m_senderRef
,
c_copyGCISlave
.
m_copyReason
,
...
...
@@ -11281,6 +11383,9 @@ void Dbdih::crashSystemAtGcpStop(Signal* signal)
c_TCGETOPSIZEREQ_Counter
.
getText
());
ndbout_c
(
"c_UPDATE_TOREQ_Counter = %s"
,
c_UPDATE_TOREQ_Counter
.
getText
());
if
(
local
==
false
)
{
jam
();
NodeRecordPtr
nodePtr
;
for
(
nodePtr
.
i
=
1
;
nodePtr
.
i
<
MAX_NDB_NODES
;
nodePtr
.
i
++
)
{
jam
();
...
...
@@ -11298,6 +11403,19 @@ void Dbdih::crashSystemAtGcpStop(Signal* signal)
SystemError
::
SignalLength
,
JBA
);
}
//if
}
//for
}
else
{
jam
();
SystemError
*
const
sysErr
=
(
SystemError
*
)
&
signal
->
theData
[
0
];
sysErr
->
errorCode
=
SystemError
::
GCPStopDetected
;
sysErr
->
errorRef
=
reference
();
sysErr
->
data1
=
cgcpStatus
;
sysErr
->
data2
=
cgcpOrderBlocked
;
EXECUTE_DIRECT
(
NDBCNTR
,
GSN_SYSTEM_ERROR
,
signal
,
SystemError
::
SignalLength
);
ndbrequire
(
false
);
}
return
;
}
//Dbdih::crashSystemAtGcpStop()
...
...
@@ -14392,6 +14510,12 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal)
infoEvent
(
buf
);
}
}
if
(
arg
==
7022
)
{
jam
();
crashSystemAtGcpStop
(
signal
,
true
);
}
}
//Dbdih::execDUMP_STATE_ORD()
void
...
...
storage/ndb/src/kernel/blocks/pgman.cpp
View file @
c54681a4
...
...
@@ -694,7 +694,14 @@ Pgman::lirs_reference(Ptr<Page_entry> ptr)
if
(
state
&
Page_entry
::
ONSTACK
)
{
jam
();
bool
at_bottom
=
!
pl_stack
.
hasPrev
(
ptr
);
pl_stack
.
remove
(
ptr
);
if
(
at_bottom
)
{
jam
();
ndbassert
(
state
&
Page_entry
::
HOT
);
lirs_stack_prune
();
}
}
pl_stack
.
add
(
ptr
);
state
|=
Page_entry
::
ONSTACK
;
...
...
@@ -1889,9 +1896,10 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
bool
at_bottom
=
!
pl_stack
.
hasPrev
(
ptr
);
pl_stack
.
remove
(
ptr
);
state
&=
~
Page_entry
::
ONSTACK
;
if
(
at_bottom
&&
(
state
&
Page_entry
::
HOT
)
)
if
(
at_bottom
)
{
jam
();
ndbassert
(
state
&
Page_entry
::
HOT
);
lirs_stack_prune
();
}
}
...
...
@@ -1903,6 +1911,7 @@ Pgman::drop_page(Ptr<Page_entry> ptr)
state
&=
~
Page_entry
::
ONQUEUE
;
}
ndbassert
(
ptr
.
p
->
m_real_page_i
!=
RNIL
);
if
(
ptr
.
p
->
m_real_page_i
!=
RNIL
)
{
jam
();
...
...
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