[MDEV-4557] Make status more visible in RBR Created: 2013-05-22  Updated: 2017-01-23  Resolved: 2017-01-23

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0.2
Fix Version/s: 10.1.22

Type: Bug Priority: Minor
Reporter: Arjen Lentz Assignee: Sachin Setiya (Inactive)
Resolution: Fixed Votes: 3
Labels: PROCESSLIST, RBR, Twitter, replication

Issue Links:
Duplicate
is duplicated by MDEV-7409 On RBR, extend the PROCESSLIST info t... Closed

 Description   

Davi Arnaut @ Twitter has created a few patches to make RBR status more visible. Can we get these included in MariaDB?
There are quite a few gems in the Twitter patches - perhaps a bigger review and a comprehensive cherrypick is in order!

https://github.com/twitter/mysql/commit/3a1e4b5682d994ccefc919a33d9ac7d2adc92705

Expose current RBR execution state in the SQL Thread state

The execution of row-based events in a replication slave is not
reflected in the SQL Thread state, making it rather difficult to
identify long-running events. For example, the execution of a large
row-by-row delete event is not immediately identifiable as the
replication SQL thread state for most of its duration stays as
"Reading event from the relay log".

This change adds two new states to the replication slave SQL thread
that are used to highlight the event that the SQL thread is executing
and, for row-based events, to indicate how many rows have been
applied. These will generally look like:

Executing Delete_rows event at position 100
Handling record 50 of 100 for a Delete_rows event

Additionally, the outermost state of a thread state is now saved and
restored when inner states are set, so that the overall information
of what the thread is doing is not lost.

https://github.com/twitter/mysql/commit/d9895b4410f744a231f789ec9d894dbe633e3b14

Slave should include the table name in its status while processing

RBR events.

When processing a row-based event, the SQL Thread state is updated to
reflect what type of event is being processed, but short of dumping the
event from the logs, there is currently no way to identify to which
table the event is being applied to.

In order to allow for easier identification of which table an event is
being applied to, this change extends the SQL Thread state to also
include the fully qualified name of the table associated with an event
being applied.



 Comments   
Comment by Jeremy Cole [ 2013-05-22 ]

I'd be happy to pick this one up. Should be quite easy actually.

Comment by Sergei Golubchik [ 2013-05-24 ]

Jeremy, it'd be great! If you'd like to do it, just submit a merge request, launchpad-style. Or email a patch, if you prefer that instead.

Comment by Arjen Lentz [ 2013-05-25 ]

Sergei, make JC a maria-captain. For some inexplicable reason, he's never been...

Comment by Sergei Golubchik [ 2013-05-25 ]

Indeed. I was sure he is.

Of course, Jeremy feel free to apply, I'll approve you right away and you'll be able to push your merge request yourself.

Comment by Sergei Golubchik [ 2013-07-18 ]

Two months of inactivity. I'm closing it as "incomplete". We can reopen it anytime if needed.

Comment by Jeremy Cole [ 2013-07-18 ]

Why not just assign it to me? Is there some metric we're aiming to improve by closing still-valid tickets?

Comment by Sergei Golubchik [ 2013-07-18 ]

no metric, I'm just trying to make sure issues aren't completely forgotten.
I'll see if I could convince Jira that you can be an assignee, at the moment you aren't.

But ok, I'll reopen the issue now.

Comment by Jeremy Cole [ 2013-07-19 ]

Thanks. I do intend to do this one pretty soon, actually. I have just been distracted with more important tasks (e.g. related to MDEV-4645). No worries though, I know it sucks to have a bunch of tickets with no movement assigned to you, so I am happy to take the assignee.

Comment by Daniel Black [ 2015-03-29 ]

I did a quick port of these patches to 10.0 - https://github.com/openquery/mariadb-server/commits/MDEV-4557-rbr-process-status. Getting a 'Timeout in wait_condition.inc..' twice in the test case. I haven't looked through why this is the case.

Comment by Sachin Setiya (Inactive) [ 2017-01-23 ]

http://lists.askmonty.org/pipermail/commits/2017-January/010488.html

Generated at Thu Feb 08 06:57:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.