4paradigm / 4paradigm/OpenMLDB
disktable and memtable behave inconsistently with max_traverse_cnt
- Vorherrschende Sprache
- C++
- Sterne
- 1.7k
- Forks
- 331
- Ø Merge
- 12 T. 12 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
When traversing a table, we use `max_traverse_cnt` to control. If `iterator->GetCount() >= max_traverse_cnt`, the traverse will be stopped. This decision is mainly in tablet_impl.cc but can be done early in disk_table.cc and mem_table.cc. For now, we add more `if (iterator->GetCount() >= max_traverse_cnt)` in disktable, which makes the `max_traverse_cnt` flag works in disktable but not in memtable. In consequence, some tests in table_test related to `max_traverse_cnt` have different results for memtable and disktable
Beitragsleitfaden
Rechercherichtung
Look at tablet_impl.cc, disk_table.cc, and mem_table.cc for the traversal logic and the check on iterator->GetCount() >= max_traverse_cnt. The inconsistency is that disk_table has this check but mem_table does not. Run the table_test tests related to max_traverse_cnt to see the differing results. The fix is to ensure the same early stop logic is applied in both table implementations.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- cpp
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100