Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3249

Default hybrid cube priority should be the same as of a regular cube

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • v2.2.0
    • Backlog
    • Query Engine
    • None
    • HDP 2.5.6, Kylin 2.2

    Description

      Hybrid cubes are assigned default priority lower than regular cubes, which leads to incorrect selection of a hybrid cube while a regular non-hybridized cube with lower cost is available.

      For example, model has a wide cube with full set of metrics and narrower cube with top-N entries for a subset of metrics.

      If wide cube is hybridized (due to a new metric addition), but top-N cube remains unchanged and non-hybridized, top-N cube will be no longer queried, causing query performance degradation.

      The issue can be tracked to the query/src/main/java/org/apache/kylin/query/routing/Candidate.java, where hybrid cubes are assigned priority 0, while regular cubes are assigned priority of 1.
      This unconditional priority assignment is incorrect as it only holds for cases when there is only one cube "flavor" in the model or when all the cubes of various "flavors" are hybridized at the same time.

      Simplest fix is to have hybrid priority to be the same as of a regular cube.
      Plus, as an enhancement to the cube selection algorithm a new rule can be implemented that will filter out regular candidate cubes that are included into candidate hybrid cubes.

      Attachments

        Activity

          People

            shaofengshi Shao Feng Shi
            seva_ostapenko Vsevolod Ostapenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: