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
bafb011a
Commit
bafb011a
authored
Nov 12, 2020
by
Sujatha
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.2' into 10.3
parents
150f447a
984a06db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
sql/log.cc
sql/log.cc
+3
-1
sql/log.h
sql/log.h
+3
-1
sql/rpl_rli.cc
sql/rpl_rli.cc
+6
-4
sql/slave.cc
sql/slave.cc
+15
-4
No files found.
sql/log.cc
View file @
bafb011a
...
...
@@ -4448,7 +4448,9 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
0
,
0
,
&
log_space_reclaimed
);
mysql_mutex_lock
(
&
rli
->
log_space_lock
);
rli
->
log_space_total
-=
log_space_reclaimed
;
my_atomic_add64_explicit
((
volatile
int64
*
)(
&
rli
->
log_space_total
),
(
-
(
int64
)
log_space_reclaimed
),
MY_MEMORY_ORDER_RELAXED
);
mysql_cond_broadcast
(
&
rli
->
log_space_cond
);
mysql_mutex_unlock
(
&
rli
->
log_space_lock
);
...
...
sql/log.h
View file @
bafb011a
...
...
@@ -731,7 +731,9 @@ class MYSQL_BIN_LOG: public TC_LOG, private MYSQL_LOG
char
buf1
[
22
],
buf2
[
22
];
#endif
DBUG_ENTER
(
"harvest_bytes_written"
);
(
*
counter
)
+=
bytes_written
;
my_atomic_add64_explicit
((
volatile
int64
*
)(
counter
),
bytes_written
,
MY_MEMORY_ORDER_RELAXED
);
DBUG_PRINT
(
"info"
,(
"counter: %s bytes_written: %s"
,
llstr
(
*
counter
,
buf1
),
llstr
(
bytes_written
,
buf2
)));
bytes_written
=
0
;
...
...
sql/rpl_rli.cc
View file @
bafb011a
...
...
@@ -458,7 +458,8 @@ static inline int add_relay_log(Relay_log_info* rli,LOG_INFO* linfo)
linfo
->
log_file_name
);
DBUG_RETURN
(
1
);
}
rli
->
log_space_total
+=
s
.
st_size
;
my_atomic_add64_explicit
((
volatile
int64
*
)(
&
rli
->
log_space_total
),
s
.
st_size
,
MY_MEMORY_ORDER_RELAXED
);
DBUG_PRINT
(
"info"
,(
"log_space_total: %llu"
,
rli
->
log_space_total
));
DBUG_RETURN
(
0
);
}
...
...
@@ -468,7 +469,8 @@ static int count_relay_log_space(Relay_log_info* rli)
{
LOG_INFO
linfo
;
DBUG_ENTER
(
"count_relay_log_space"
);
rli
->
log_space_total
=
0
;
my_atomic_store64_explicit
((
volatile
int64
*
)(
&
rli
->
log_space_total
),
0
,
MY_MEMORY_ORDER_RELAXED
);
if
(
rli
->
relay_log
.
find_log_pos
(
&
linfo
,
NullS
,
1
))
{
sql_print_error
(
"Could not find first log while counting relay log space"
);
...
...
@@ -1227,8 +1229,8 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
strmake_buf
(
rli
->
group_relay_log_name
,
rli
->
relay_log
.
get_log_fname
());
strmake_buf
(
rli
->
event_relay_log_name
,
rli
->
relay_log
.
get_log_fname
());
rli
->
group_relay_log_pos
=
rli
->
event_relay_log_pos
=
BIN_LOG_HEADER_SIZE
;
rli
->
log_space_total
=
0
;
my_atomic_store64_explicit
((
volatile
int64
*
)(
&
rli
->
log_space_total
),
0
,
MY_MEMORY_ORDER_RELAXED
);
if
(
count_relay_log_space
(
rli
))
{
*
errmsg
=
"Error counting relay log space"
;
...
...
sql/slave.cc
View file @
bafb011a
...
...
@@ -2687,7 +2687,10 @@ static bool wait_for_relay_log_space(Relay_log_info* rli)
&
rli
->
log_space_lock
,
&
stage_waiting_for_relay_log_space
,
&
old_stage
);
while
(
rli
->
log_space_limit
<
rli
->
log_space_total
&&
while
(
rli
->
log_space_limit
<
(
ulonglong
)
my_atomic_load64_explicit
((
volatile
int64
*
)
(
&
rli
->
log_space_total
),
MY_MEMORY_ORDER_RELAXED
)
&&
!
(
slave_killed
=
io_slave_killed
(
mi
))
&&
!
rli
->
ignore_log_space_limit
)
mysql_cond_wait
(
&
rli
->
log_space_cond
,
&
rli
->
log_space_lock
);
...
...
@@ -3250,7 +3253,10 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
protocol
->
store
(
mi
->
rli
.
last_error
().
message
,
&
my_charset_bin
);
protocol
->
store
((
uint32
)
mi
->
rli
.
slave_skip_counter
);
protocol
->
store
((
ulonglong
)
mi
->
rli
.
group_master_log_pos
);
protocol
->
store
((
ulonglong
)
mi
->
rli
.
log_space_total
);
protocol
->
store
((
ulonglong
)
my_atomic_load64_explicit
((
volatile
int64
*
)
(
&
mi
->
rli
.
log_space_total
),
MY_MEMORY_ORDER_RELAXED
));
protocol
->
store
(
mi
->
rli
.
until_condition
==
Relay_log_info
::
UNTIL_NONE
?
"None"
:
...
...
@@ -4983,7 +4989,9 @@ Stopping slave I/O thread due to out-of-memory error from master");
#endif
if
(
rli
->
log_space_limit
&&
rli
->
log_space_limit
<
rli
->
log_space_total
&&
(
ulonglong
)
my_atomic_load64_explicit
((
volatile
int64
*
)
(
&
rli
->
log_space_total
),
MY_MEMORY_ORDER_RELAXED
)
&&
!
rli
->
ignore_log_space_limit
)
if
(
wait_for_relay_log_space
(
rli
))
{
...
...
@@ -7678,7 +7686,10 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size)
is are able to rotate and purge sometime soon.
*/
if
(
rli
->
log_space_limit
&&
rli
->
log_space_limit
<
rli
->
log_space_total
)
rli
->
log_space_limit
<
(
ulonglong
)
my_atomic_load64_explicit
((
volatile
int64
*
)
(
&
rli
->
log_space_total
),
MY_MEMORY_ORDER_RELAXED
))
{
/* force rotation if not in an unfinished group */
rli
->
sql_force_rotate_relay
=
!
rli
->
is_in_group
();
...
...
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