4paradigm / 4paradigm/OpenMLDB
base and pre-aggr table may not be consistent if the leader changes
- Vorherrschende Sprache
- C++
- Sterne
- 1.7k
- Forks
- 331
- Ø Merge
- 12 T. 12 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
**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.
Beitragsleitfaden
Rechercherichtung
Das Issue beschreibt ein Konsistenzproblem zwischen Basis- und Pre-Aggregationstabellen während Leader-Wechseln in einer verteilten Datenbank. Untersuche den Quellcode von OpenMLDB auf die Mechanismen zur Leader-Wahl und Datensynchronisierung und konzentriere dich darauf, wie Offsets erfasst und aktualisiert werden. Suche nach Modulen, die die Tabellenreplikation, Leadership-Übergänge und Hintergrund-Aggregationsaufgaben behandeln, um den aktuellen Ablauf und die Ursache der Inkonsistenz zu verstehen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- databases, machine-learning
- Bereich
- databases, distributed-systems
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100