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
3f5f7b34
Commit
3f5f7b34
authored
Jul 07, 2006
by
stewart@willster.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BUG#13985 Cluster: ndb_mgm "status" command can return incorrect data node status
use existing transporter mutex
parent
b918bda2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
ndb/src/ndbapi/ClusterMgr.cpp
ndb/src/ndbapi/ClusterMgr.cpp
+11
-14
ndb/src/ndbapi/ClusterMgr.hpp
ndb/src/ndbapi/ClusterMgr.hpp
+0
-1
No files found.
ndb/src/ndbapi/ClusterMgr.cpp
View file @
3f5f7b34
...
...
@@ -69,7 +69,6 @@ ClusterMgr::ClusterMgr(TransporterFacade & _facade):
DBUG_ENTER
(
"ClusterMgr::ClusterMgr"
);
ndbSetOwnVersion
();
clusterMgrThreadMutex
=
NdbMutex_Create
();
waitForHBMutex
=
NdbMutex_Create
();
waitForHBCond
=
NdbCondition_Create
();
noOfAliveNodes
=
0
;
noOfConnectedNodes
=
0
;
...
...
@@ -83,7 +82,6 @@ ClusterMgr::~ClusterMgr()
DBUG_ENTER
(
"ClusterMgr::~ClusterMgr"
);
doStop
();
NdbCondition_Destroy
(
waitForHBCond
);
NdbMutex_Destroy
(
waitForHBMutex
);
NdbMutex_Destroy
(
clusterMgrThreadMutex
);
DBUG_VOID_RETURN
;
}
...
...
@@ -172,8 +170,15 @@ ClusterMgr::doStop( ){
void
ClusterMgr
::
forceHB
(
NodeBitmask
waitFor
)
{
NdbMutex_Lock
(
waitForHBMutex
);
theFacade
.
lock_mutex
();
if
(
!
waitForHBFromNodes
.
isclear
())
{
NdbCondition_WaitTimeout
(
waitForHBCond
,
theFacade
.
theMutexPtr
,
1000
);
theFacade
.
unlock_mutex
();
return
;
}
global_flag_send_heartbeat_now
=
1
;
waitForHBFromNodes
=
waitFor
;
...
...
@@ -203,10 +208,8 @@ ClusterMgr::forceHB(NodeBitmask waitFor)
theFacade
.
sendSignalUnCond
(
&
signal
,
nodeId
);
}
NdbCondition_WaitTimeout
(
waitForHBCond
,
theFacade
.
theMutexPtr
,
1000
);
theFacade
.
unlock_mutex
();
NdbCondition_WaitTimeout
(
waitForHBCond
,
waitForHBMutex
,
1000
);
NdbMutex_Unlock
(
waitForHBMutex
);
#ifdef DEBUG_REG
ndbout
<<
"Still waiting for HB from "
<<
waitForHBFromNodes
.
getText
(
buf
)
<<
endl
;
#endif
...
...
@@ -401,13 +404,10 @@ ClusterMgr::execAPI_REGCONF(const Uint32 * theData){
node
.
hbFrequency
=
(
apiRegConf
->
apiHeartbeatFrequency
*
10
)
-
50
;
}
NdbMutex_Lock
(
waitForHBMutex
);
waitForHBFromNodes
.
clear
(
nodeId
);
if
(
waitForHBFromNodes
.
isclear
())
NdbCondition_Signal
(
waitForHBCond
);
NdbMutex_Unlock
(
waitForHBMutex
);
NdbCondition_Broadcast
(
waitForHBCond
);
}
void
...
...
@@ -436,13 +436,10 @@ ClusterMgr::execAPI_REGREF(const Uint32 * theData){
default:
break
;
}
waitForHBFromNodes
.
clear
(
nodeId
);
if
(
waitForHBFromNodes
.
isclear
())
{
NdbMutex_Lock
(
waitForHBMutex
);
NdbCondition_Signal
(
waitForHBCond
);
NdbMutex_Unlock
(
waitForHBMutex
);
}
}
void
...
...
ndb/src/ndbapi/ClusterMgr.hpp
View file @
3f5f7b34
...
...
@@ -89,7 +89,6 @@ private:
NdbThread
*
theClusterMgrThread
;
NodeBitmask
waitForHBFromNodes
;
// used in forcing HBs
NdbMutex
*
waitForHBMutex
;
NdbCondition
*
waitForHBCond
;
/**
...
...
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