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
5876ed9e
Commit
5876ed9e
authored
Apr 15, 2020
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relay_log_info::executed_entries to Atomic_counter
parent
c1bdf624
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
14 deletions
+4
-14
include/my_pthread.h
include/my_pthread.h
+0
-10
sql/rpl_parallel.cc
sql/rpl_parallel.cc
+1
-1
sql/rpl_rli.h
sql/rpl_rli.h
+1
-1
sql/slave.cc
sql/slave.cc
+2
-2
No files found.
include/my_pthread.h
View file @
5876ed9e
...
...
@@ -827,16 +827,6 @@ static inline void thread_safe_decrement32(int32 *value)
(
void
)
my_atomic_add32_explicit
(
value
,
-
1
,
MY_MEMORY_ORDER_RELAXED
);
}
static
inline
void
thread_safe_increment64
(
int64
*
value
)
{
(
void
)
my_atomic_add64_explicit
(
value
,
1
,
MY_MEMORY_ORDER_RELAXED
);
}
static
inline
void
thread_safe_decrement64
(
int64
*
value
)
{
(
void
)
my_atomic_add64_explicit
(
value
,
-
1
,
MY_MEMORY_ORDER_RELAXED
);
}
/*
No locking needed, the counter is owned by the thread
*/
...
...
sql/rpl_parallel.cc
View file @
5876ed9e
...
...
@@ -60,7 +60,7 @@ rpt_handle_event(rpl_parallel_thread::queued_event *qev,
rgi
->
last_master_timestamp
=
ev
->
when
+
(
time_t
)
ev
->
exec_time
;
err
=
apply_event_and_update_pos_for_parallel
(
ev
,
thd
,
rgi
);
thread_safe_increment64
(
&
rli
->
executed_entries
)
;
rli
->
executed_entries
++
;
#ifdef WITH_WSREP
if
(
wsrep_after_statement
(
thd
))
{
...
...
sql/rpl_rli.h
View file @
5876ed9e
...
...
@@ -347,7 +347,7 @@ class Relay_log_info : public Slave_reporting_capability
Number of executed events for SLAVE STATUS.
Protected by slave_executed_entries_lock
*/
int64
executed_entries
;
Atomic_counter
<
uint32_t
>
executed_entries
;
/*
If the end of the hot relay log is made of master's events ignored by the
...
...
sql/slave.cc
View file @
5876ed9e
...
...
@@ -3438,7 +3438,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
{
protocol
->
store
((
uint32
)
mi
->
rli
.
retried_trans
);
protocol
->
store
((
ulonglong
)
mi
->
rli
.
max_relay_log_size
);
protocol
->
store
(
(
uint32
)
mi
->
rli
.
executed_entries
);
protocol
->
store
(
mi
->
rli
.
executed_entries
);
protocol
->
store
((
uint32
)
mi
->
received_heartbeats
);
protocol
->
store
((
double
)
mi
->
heartbeat_period
,
3
,
&
tmp
);
protocol
->
store
(
gtid_pos
->
ptr
(),
gtid_pos
->
length
(),
&
my_charset_bin
);
...
...
@@ -4537,7 +4537,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
}
}
thread_safe_increment64
(
&
rli
->
executed_entries
)
;
rli
->
executed_entries
++
;
#ifdef WITH_WSREP
wsrep_after_statement
(
thd
);
#endif
/* WITH_WSREP */
...
...
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