MariaDB binlog events differ from MySQL

オープン
#296 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

@HemeraOne がすでに取り組んでいます。

2021年7月8日 から。

  • #297 @HemeraOne による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go, mariadb, mysql
領域
databases

調査の方向性

Start with the binlog_streamer entry point and the replication.TableMapEvent, replication.GenericEvent, and replication.QueryEvent handling. Compare the MariaDB ANNOTATE_ROWS_EVENT and the embedded BEGIN text with the zero log position error; done means MariaDB binlog streaming no longer panics on these events.

索引モデルが issue の本文から書いたものです。

説明

Running the binlog_streamer from MariaDB seems to be a little bit different.

an error seems to occur:

PANI[0001] tried to advance to a zero log position: mysql-bin.047756 0 string  tag=source_binlog_streamer

I tracked it down to the following events:
*replication.TableMapEvent, *replication.GenericEvent, *replication.QueryEvent

Which is documented to happen when a replica is unable to understand MariaDB's protocol:
"Dummy event replacing event type X that slave cannot handle."

To me it looks like it comes from the following events:
ANNOTATE_ROWS_EVENT (https://mariadb.com/kb/en/annotate_rows_event/)
As this is what I sniffed from the traffic:

# Dummy event replacing event type 160 that slave cannot handle

and the plain text "BEGIN" which both gets shoved in the replication.QueryEvent

Further more the also state that the TABLE_MAP_EVENT is used for row-based binlog:
https://mariadb.com/kb/en/table_map_event/

Currently debugging for more data, will come with a PR that works with my current MariaDB: 10.3.28-MariaDB-1:10.3.28+maria~focal-log

主要言語
Go
スター
858
フォーク
77
平均マージ
10日 4時間
マージ済み PR(30日)
4

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Shopify/ghostferry のほかの issue

Shopify/ghostferry の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。