4paradigm / 4paradigm/OpenMLDB
base and pre-aggr table may not be consistent if the leader changes
- 主要言語
- C++
- スター
- 1.7k
- フォーク
- 331
- 平均マージ
- 12日 12時間
- マージ済み PR(30日)
- 1
説明
**Bug Description**
- leaders of base and pre-aggr tables: is always consistent
- followers of base and pre-aggr tables: not consistent. they are synced from leaders separately.
If there is a change in the leadership, it may cause in-consistency:
- the offset of base is not consistent with the offset of pre-aggr
- the leaders of base and pre-aggr will not be in the same tablet. The leader of pre-aggr table will never be updated.
**Expected Behavior**
Potential solutions:
- leaders of base and pre-aggr tables are not necessary to be in the same tablet
- offset checking before updating the pre-aggr table:
- if base > pre-aggr + 1, there may be some data lost in pre-aggr. have to manually update the pre-aggr until the base latest
- if base <= pre-aggr + 1, there may be some data lost in base. have to remove the new data from pre-aggr
In order not to affect the online service, the pre-aggr update should be done asynchronously in the background.
**Relation Case**
**Steps to Reproduce**
1.
2.
3.
4.
コントリビューションガイド
調査の方向性
この issue は、分散データベースで leader が変更された際のベーステーブルと事前集計テーブル間の一貫性の問題について説明しています。OpenMLDB のソースコードにおける leader 選出とデータ同期のメカニズムを調査し、offset がどのように追跡・更新されるかに焦点を当ててください。テーブルレプリケーション、leader の遷移、バックグラウンド集計タスクを扱うモジュールを探し、現在のフローと不整合が発生する箇所を理解してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- databases, machine-learning
- 領域
- databases, distributed-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100