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
e17a28ed
Commit
e17a28ed
authored
May 10, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb: fix assertion code in event code during cluster shutdown
parent
30c569f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
17 deletions
+27
-17
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+27
-17
No files found.
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
View file @
e17a28ed
...
...
@@ -1523,30 +1523,39 @@ NdbEventBuffer::completeClusterFailed()
}
while
((
op
=
m_ndb
->
getEventOperation
(
op
)));
/**
*
Find min not completed GCI
*
Release all GCI's with m_gci > gci
*/
Uint32
i
;
Uint32
sz
=
m_active_gci
.
size
();
Uint64
gci
=
~
0
;
Uint64
gci
=
data
.
gci
;
Gci_container
*
bucket
=
0
;
Gci_container
*
array
=
(
Gci_container
*
)
m_active_gci
.
getBase
();
for
(
i
=
0
;
i
<
sz
;
i
++
)
{
if
(
array
[
i
].
m_gcp_complete_rep_count
&&
array
[
i
].
m_gci
<
gci
)
Gci_container
*
tmp
=
array
+
i
;
if
(
tmp
->
m_gci
>
gci
)
{
if
(
!
tmp
->
m_data
.
is_empty
())
{
bucket
=
array
+
i
;
gci
=
bucket
->
m_gci
;
free_list
(
tmp
->
m_data
);
}
tmp
->~
Gci_container
();
bzero
(
tmp
,
sizeof
(
Gci_container
));
}
/**
* Release all GCI's with m_gci > gci
*/
for
(
i
=
0
;
i
<
sz
;
i
++
)
else
if
(
tmp
->
m_gcp_complete_rep_count
)
{
Gci_container
*
tmp
=
array
+
i
;
if
(
tmp
->
m_gci
>
gci
)
if
(
tmp
->
m_gci
==
gci
)
{
bucket
=
tmp
;
continue
;
}
// we have found an old not-completed gci
// something is wrong, assert in debug, but try so salvage
// in release
ndbout_c
(
"out of order bucket detected at cluster disconnect, "
"data.gci: %u. tmp->m_gci: %u"
,
(
unsigned
)
data
.
gci
,
(
unsigned
)
tmp
->
m_gci
);
assert
(
false
);
if
(
!
tmp
->
m_data
.
is_empty
())
{
free_list
(
tmp
->
m_data
);
...
...
@@ -1556,7 +1565,8 @@ NdbEventBuffer::completeClusterFailed()
}
}
assert
(
bucket
!=
0
&&
data
.
gci
==
gci
);
assert
(
bucket
!=
0
);
const
Uint32
cnt
=
bucket
->
m_gcp_complete_rep_count
=
1
;
bucket
->
m_gci
=
gci
;
bucket
->
m_gcp_complete_rep_count
=
cnt
;
...
...
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