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
47a33ee5
Commit
47a33ee5
authored
Dec 12, 2006
by
jonas@perch.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - bug#24949
make sure not too poll to long, in case of hb-failure of last db-node
parent
05dd5fc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
storage/ndb/src/ndbapi/Ndbif.cpp
storage/ndb/src/ndbapi/Ndbif.cpp
+2
-2
storage/ndb/src/ndbapi/TransporterFacade.cpp
storage/ndb/src/ndbapi/TransporterFacade.cpp
+3
-5
No files found.
storage/ndb/src/ndbapi/Ndbif.cpp
View file @
47a33ee5
...
@@ -1276,9 +1276,9 @@ Ndb::waitCompletedTransactions(int aMilliSecondsToWait,
...
@@ -1276,9 +1276,9 @@ Ndb::waitCompletedTransactions(int aMilliSecondsToWait,
NDB_TICKS
currTime
=
NdbTick_CurrentMillisecond
();
NDB_TICKS
currTime
=
NdbTick_CurrentMillisecond
();
NDB_TICKS
maxTime
=
currTime
+
(
NDB_TICKS
)
waitTime
;
NDB_TICKS
maxTime
=
currTime
+
(
NDB_TICKS
)
waitTime
;
theMinNoOfEventsToWakeUp
=
noOfEventsToWaitFor
;
theMinNoOfEventsToWakeUp
=
noOfEventsToWaitFor
;
const
int
maxsleep
=
aMilliSecondsToWait
>
10
?
10
:
aMilliSecondsToWait
;
do
{
do
{
if
(
waitTime
<
1000
)
waitTime
=
1000
;
poll_guard
->
wait_for_input
(
maxsleep
);
poll_guard
->
wait_for_input
(
waitTime
);
if
(
theNoOfCompletedTransactions
>=
(
Uint32
)
noOfEventsToWaitFor
)
{
if
(
theNoOfCompletedTransactions
>=
(
Uint32
)
noOfEventsToWaitFor
)
{
break
;
break
;
}
//if
}
//if
...
...
storage/ndb/src/ndbapi/TransporterFacade.cpp
View file @
47a33ee5
...
@@ -1385,15 +1385,13 @@ int PollGuard::wait_for_input_in_loop(int wait_time, bool forceSend)
...
@@ -1385,15 +1385,13 @@ int PollGuard::wait_for_input_in_loop(int wait_time, bool forceSend)
m_tp
->
forceSend
(
m_block_no
);
m_tp
->
forceSend
(
m_block_no
);
else
else
m_tp
->
checkForceSend
(
m_block_no
);
m_tp
->
checkForceSend
(
m_block_no
);
if
(
wait_time
==
-
1
)
//Means wait forever
response_time
=
WAITFOR_RESPONSE_TIMEOUT
;
else
response_time
=
wait_time
;
NDB_TICKS
curr_time
=
NdbTick_CurrentMillisecond
();
NDB_TICKS
curr_time
=
NdbTick_CurrentMillisecond
();
NDB_TICKS
max_time
=
curr_time
+
(
NDB_TICKS
)
wait_time
;
NDB_TICKS
max_time
=
curr_time
+
(
NDB_TICKS
)
wait_time
;
const
int
maxsleep
=
(
wait_time
==
-
1
||
wait_time
>
10
)
?
10
:
wait_time
;
do
do
{
{
wait_for_input
(
response_time
);
wait_for_input
(
maxsleep
);
Uint32
state
=
m_waiter
->
get_state
();
Uint32
state
=
m_waiter
->
get_state
();
if
(
state
==
NO_WAIT
)
if
(
state
==
NO_WAIT
)
{
{
...
...
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