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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0183b3d3
Commit
0183b3d3
authored
Apr 25, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb: added some retry sleep to not get busy loops
parent
aca5ac19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+12
-0
No files found.
sql/ha_ndbcluster_binlog.cc
View file @
0183b3d3
...
...
@@ -1024,6 +1024,7 @@ ndbcluster_update_slock(THD *thd,
const
NDBTAB
*
ndbtab
=
ndbtab_g
.
get_table
();
NdbTransaction
*
trans
=
0
;
int
retries
=
100
;
int
retry_sleep
=
10
;
/* 10 milliseconds, transaction */
const
NDBCOL
*
col
[
SCHEMA_SIZE
];
unsigned
sz
[
SCHEMA_SIZE
];
...
...
@@ -1125,6 +1126,7 @@ ndbcluster_update_slock(THD *thd,
{
if
(
trans
)
ndb
->
closeTransaction
(
trans
);
my_sleep
(
retry_sleep
);
continue
;
// retry
}
}
...
...
@@ -1323,6 +1325,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
const
NDBTAB
*
ndbtab
=
ndbtab_g
.
get_table
();
NdbTransaction
*
trans
=
0
;
int
retries
=
100
;
int
retry_sleep
=
10
;
/* 10 milliseconds, transaction */
const
NDBCOL
*
col
[
SCHEMA_SIZE
];
unsigned
sz
[
SCHEMA_SIZE
];
...
...
@@ -1427,6 +1430,7 @@ int ndbcluster_log_schema_op(THD *thd, NDB_SHARE *share,
{
if
(
trans
)
ndb
->
closeTransaction
(
trans
);
my_sleep
(
retry_sleep
);
continue
;
// retry
}
}
...
...
@@ -2715,6 +2719,11 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
TABLE
*
table
=
share
->
table
;
int
retries
=
100
;
/*
100 milliseconds, temporary error on schema operation can
take some time to be resolved
*/
int
retry_sleep
=
100
;
while
(
1
)
{
pthread_mutex_lock
(
&
injector_mutex
);
...
...
@@ -2843,7 +2852,10 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
ndb
->
dropEventOperation
(
op
);
pthread_mutex_unlock
(
&
injector_mutex
);
if
(
retries
)
{
my_sleep
(
retry_sleep
);
continue
;
}
DBUG_RETURN
(
-
1
);
}
pthread_mutex_unlock
(
&
injector_mutex
);
...
...
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