apache/pinot

Unify some behavior in TableDataManager

Open

#9,752 创建于 2022年11月7日

在 GitHub 查看
 (2 评论) (2 反应) (0 负责人)Java (1,234 fork)batch import
bugcleanupgood first issue

仓库指标

Star
 (4,937 star)
PR 合并指标
 (平均合并 6天 7小时) (30 天内合并 186 个 PR)

描述

In the TableDataManager:

  • void addSegment(File indexDir, IndexLoadingConfig indexLoadingConfig) is never used in production code (the only non-testing caller addOfflineSegment() is not wired up)
  • void addSegment(String segmentName, TableConfig tableConfig, IndexLoadingConfig indexLoadingConfig) can be simplified because TableConfig is included in the IndexLoadingConfig
  • void addOrReplaceSegment(String segmentName, IndexLoadingConfig indexLoadingConfig, SegmentZKMetadata zkMetadata, @Nullable SegmentMetadata localMetadata) should be broken into 2 methods: addSegment() and refreshSegment()
  • Loading committed segment into real-time table should share the same logic as loading segment into offline table. Currently the logic is diverged, which causes moving tier not happening for real-time table

Ideally we want to keep the following methods:

  • addSegment
  • addConsumingSegment (real-time only)
  • refreshSegment
  • reloadSegment
  • removeSegment

贡献者指南