Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

BUG#34930969: Previous_gtids miss gtid when binlog_order_commits off

未關閉
#94 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
冷清
技術堆疊
cpp, mysql
領域
databases

研究方向

首先定位 MYSQL_BIN_LOG::finish_commit,並檢查 dec_prep_xids 與 gtid_state->update_on_commit 的順序。檢查 after_dec_prep_xids DEBUG_SYNC 點和 MTR 測試案例 rpl_previous_gtids。完成的標準是測試驗證在 binlog_order_commits 關閉時,Previous_gtids 包含所有已提交的 GTID。

由索引模型根據 Issue 內容生成。

描述

Problem

When binlog_order_commits is turned off, binlog rotate will wait for m_prep_xids to decrease to zero. However, m_prep_xids was decreased before updating the thread GTID to gtid_executed in MYSQL_BIN_LOG::finish_commit, causing GTIDs to be missed in the next binlog file Previous_gtids event.

Fix

The core fix moves dec_prep_xids to be called after gtid_state->update_on_commit in MYSQL_BIN_LOG::finish_commit. This ensures that when binlog rotate waits for m_prep_xids to reach zero, all GTIDs have already been registered in gtid_executed.

Additionally:

  • Added DEBUG_SYNC point after_dec_prep_xids to enable deterministic testing
  • Added MTR test case rpl_previous_gtids to verify the fix

Commit

https://github.com/xyw0537/TXSQL/commit/ae7de225c2a

Branch: bugfix/previous_gtids_miss_gtid_binlog_order_commits_off

Upstream Reference

https://github.com/mysql/mysql-server/commit/a3faa6f8799e6c7c610245d2899386131731fb41

主要語言
C++
星號
338
分支
235
PR 合併指標
30 天內沒有已合併 PR

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

OpenTenBase/TXSQL 的其他 Issue

查看 OpenTenBase/TXSQL 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。