[MDEV-4457] [PATCH] Do not put stop events into binlog Created: 2013-04-29  Updated: 2013-05-01  Resolved: 2013-05-01

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

Type: Bug Priority: Minor
Reporter: Pavel Ivanov Assignee: Kristian Nielsen
Resolution: Won't Fix Votes: 0
Labels: None

Attachments: File no_stop_events.patch    

 Description   

We have the attached patch in our MySQL and MariaDB trees that removes the code putting stop events into binlog. The reasoning for removing these events is:

  1. The slave takes no action in response to the event so it isn't needed to begin with.
  2. If the master and slave are running with different binlog formats, the slave writes the stop event in its format while the rest of the events in the relay logs are of the master's format. This can cause the SQL thread to explode when it tries to read the stop event.
  3. If the master is generating an ID sequence we do not want the stop event to consume an ID.

Could you consider including this patch into MariaDB?



 Comments   
Comment by Kristian Nielsen [ 2013-04-30 ]

I do not understand the rationale for this patch:

> 2. If the master and slave are running with different binlog formats, the
> slave writes the stop event in its format while the rest of the events in
> the relay logs are of the master's format. This can cause the SQL thread to
> explode when it tries to read the stop event.

I do not understand "different format"? As far as I know, the stop event is
always in the same format in MariaDB (I know only of statement vs. row format,
which applies only to query events).

Can you explain how to make the "SQL thread to explode" on stop event in
MariaDB?

> 3. If the master is generating an ID sequence we do not want the stop event
> to consume an ID.

In MariaDB GTID, IDs are generated only for GTID events, not for STOP or any
other event.

It sounds to me like this is related to the Google patch for global
transaction ID. Where an ID is added to every event (hence 3). And where
perhaps this adding of ID or not can be enabled/disabled? Hence (2).

But this does not apply to MariaDB. Global transaction ID is always enabled,
and it only affects the new GTID events, so no different formats of events.

/me confused ...

Comment by Pavel Ivanov [ 2013-04-30 ]

Thank you Kristian for explaining to me what this patch is really about.
This patch was in our tree for so long that nobody remembered what it's about and how to reproduce the problems it's supposed to fix. Your explanation sounds perfectly reasonable to me and it looks like indeed we don't need the patch in MariaDB tree. So we'll drop it and revisit the issue if something breaks. For now you can close the ticket as Won't Fix.
Out of curiosity: could you explain what the stop event is originally intended for? What's its purpose?

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