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
d07232a0
Commit
d07232a0
authored
Jan 25, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge perch.ndb.mysql.com:/home/jonas/src/51-new
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
parents
3af6991e
5c391f94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
+81
-0
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+2
-0
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+79
-0
No files found.
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
View file @
d07232a0
...
@@ -1601,6 +1601,8 @@ private:
...
@@ -1601,6 +1601,8 @@ private:
* Reply from nodeId
* Reply from nodeId
*/
*/
void
startInfoReply
(
Signal
*
,
Uint32
nodeId
);
void
startInfoReply
(
Signal
*
,
Uint32
nodeId
);
void
dump_replica_info
();
}
;
}
;
#if (DIH_CDATA_SIZE < _SYSFILE_SIZE32)
#if (DIH_CDATA_SIZE < _SYSFILE_SIZE32)
...
...
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
d07232a0
...
@@ -8925,6 +8925,80 @@ void Dbdih::packFragIntoPagesLab(Signal* signal, RWFragment* wf)
...
@@ -8925,6 +8925,80 @@ void Dbdih::packFragIntoPagesLab(Signal* signal, RWFragment* wf)
/*****************************************************************************/
/*****************************************************************************/
/* ********** START FRAGMENT MODULE *************/
/* ********** START FRAGMENT MODULE *************/
/*****************************************************************************/
/*****************************************************************************/
void
Dbdih
::
dump_replica_info
()
{
TabRecordPtr
tabPtr
;
FragmentstorePtr
fragPtr
;
for
(
tabPtr
.
i
=
0
;
tabPtr
.
i
<
ctabFileSize
;
tabPtr
.
i
++
)
{
ptrCheckGuard
(
tabPtr
,
ctabFileSize
,
tabRecord
);
if
(
tabPtr
.
p
->
tabStatus
!=
TabRecord
::
TS_ACTIVE
)
continue
;
for
(
Uint32
fid
=
0
;
fid
<
tabPtr
.
p
->
totalfragments
;
fid
++
)
{
getFragstore
(
tabPtr
.
p
,
fid
,
fragPtr
);
ndbout_c
(
"tab: %d frag: %d gci: %d
\n
-- storedReplicas:"
,
tabPtr
.
i
,
fid
,
SYSFILE
->
newestRestorableGCI
);
Uint32
i
;
ReplicaRecordPtr
replicaPtr
;
replicaPtr
.
i
=
fragPtr
.
p
->
storedReplicas
;
for
(;
replicaPtr
.
i
!=
RNIL
;
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
)
{
ptrCheckGuard
(
replicaPtr
,
creplicaFileSize
,
replicaRecord
);
ndbout_c
(
" node: %d initialGci: %d nextLcp: %d noCrashedReplicas: %d"
,
replicaPtr
.
p
->
procNode
,
replicaPtr
.
p
->
initialGci
,
replicaPtr
.
p
->
nextLcp
,
replicaPtr
.
p
->
noCrashedReplicas
);
for
(
i
=
0
;
i
<
MAX_LCP_STORED
;
i
++
)
{
ndbout_c
(
" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d"
,
i
,
(
replicaPtr
.
p
->
lcpStatus
[
i
]
==
ZVALID
?
"VALID"
:
"INVALID"
),
replicaPtr
.
p
->
lcpId
[
i
],
replicaPtr
.
p
->
maxGciCompleted
[
i
],
replicaPtr
.
p
->
maxGciStarted
[
i
]);
}
for
(
i
=
0
;
i
<
8
;
i
++
)
{
ndbout_c
(
" crashed replica: %d replicaLastGci: %d createGci: %d"
,
i
,
replicaPtr
.
p
->
replicaLastGci
[
i
],
replicaPtr
.
p
->
createGci
[
i
]);
}
}
ndbout_c
(
" -- oldStoredReplicas"
);
replicaPtr
.
i
=
fragPtr
.
p
->
oldStoredReplicas
;
for
(;
replicaPtr
.
i
!=
RNIL
;
replicaPtr
.
i
=
replicaPtr
.
p
->
nextReplica
)
{
ptrCheckGuard
(
replicaPtr
,
creplicaFileSize
,
replicaRecord
);
for
(
i
=
0
;
i
<
MAX_LCP_STORED
;
i
++
)
{
ndbout_c
(
" i: %d %s : lcpId: %d maxGci Completed: %d Started: %d"
,
i
,
(
replicaPtr
.
p
->
lcpStatus
[
i
]
==
ZVALID
?
"VALID"
:
"INVALID"
),
replicaPtr
.
p
->
lcpId
[
i
],
replicaPtr
.
p
->
maxGciCompleted
[
i
],
replicaPtr
.
p
->
maxGciStarted
[
i
]);
}
for
(
i
=
0
;
i
<
8
;
i
++
)
{
ndbout_c
(
" crashed replica: %d replicaLastGci: %d createGci: %d"
,
i
,
replicaPtr
.
p
->
replicaLastGci
[
i
],
replicaPtr
.
p
->
createGci
[
i
]);
}
}
}
}
}
void
Dbdih
::
startFragment
(
Signal
*
signal
,
Uint32
tableId
,
Uint32
fragId
)
void
Dbdih
::
startFragment
(
Signal
*
signal
,
Uint32
tableId
,
Uint32
fragId
)
{
{
Uint32
TloopCount
=
0
;
Uint32
TloopCount
=
0
;
...
@@ -8986,6 +9060,7 @@ void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
...
@@ -8986,6 +9060,7 @@ void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
/* SEARCH FOR STORED REPLICAS THAT CAN BE USED TO RESTART THE SYSTEM. */
/* SEARCH FOR STORED REPLICAS THAT CAN BE USED TO RESTART THE SYSTEM. */
/* ----------------------------------------------------------------------- */
/* ----------------------------------------------------------------------- */
searchStoredReplicas
(
fragPtr
);
searchStoredReplicas
(
fragPtr
);
if
(
cnoOfCreateReplicas
==
0
)
{
if
(
cnoOfCreateReplicas
==
0
)
{
/* --------------------------------------------------------------------- */
/* --------------------------------------------------------------------- */
/* THERE WERE NO STORED REPLICAS AVAILABLE THAT CAN SERVE AS REPLICA TO*/
/* THERE WERE NO STORED REPLICAS AVAILABLE THAT CAN SERVE AS REPLICA TO*/
...
@@ -8998,6 +9073,10 @@ void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
...
@@ -8998,6 +9073,10 @@ void Dbdih::startFragment(Signal* signal, Uint32 tableId, Uint32 fragId)
char
buf
[
64
];
char
buf
[
64
];
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"table: %d fragment: %d gci: %d"
,
BaseString
::
snprintf
(
buf
,
sizeof
(
buf
),
"table: %d fragment: %d gci: %d"
,
tableId
,
fragId
,
SYSFILE
->
newestRestorableGCI
);
tableId
,
fragId
,
SYSFILE
->
newestRestorableGCI
);
ndbout_c
(
buf
);
dump_replica_info
();
progError
(
__LINE__
,
NDBD_EXIT_NO_RESTORABLE_REPLICA
,
buf
);
progError
(
__LINE__
,
NDBD_EXIT_NO_RESTORABLE_REPLICA
,
buf
);
ndbrequire
(
false
);
ndbrequire
(
false
);
return
;
return
;
...
...
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