Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-13276

Revise the documentation of query option 'RUNTIME_FILTER_WAIT_TIME_MS'

    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.5.0, Impala 4.4.1
    • Docs
    • None

    Description

      The documentation of the query option 'RUNTIME_FILTER_WAIT_TIME_MS' at https://github.com/apache/impala/blob/master/docs/topics/impala_runtime_filter_wait_time_ms.xml#L37-L43 as provided in the following describes the meaning of this query option.

            The <codeph>RUNTIME_FILTER_WAIT_TIME_MS</codeph> query option
            adjusts the settings for the runtime filtering feature.
            It specifies a time in milliseconds that each scan node waits for
            runtime filters to be produced by other plan fragments.
      

       

      However the description above is not entirely accurate in that the wait time is with respect to the time when a runtime filter was registered (within QueryState::InitFilterBank()) instead of the time when a scan node is calling ScanNode::WaitForRuntimeFilters(). For instance if a scan node started so late that when ScanNode::WaitForRuntimeFilters() was called, the amount of time passed since the registration of this runtime filter was already greater than the value of 'RUNTIME_FILTER_WAIT_TIME_MS', this scan node would not be waiting for the runtime filter. Refer to https://github.com/apache/impala/blob/master/be/src/runtime/runtime-filter.cc#L86-L87 for further details.

      bool RuntimeFilter::WaitForArrival(int32_t timeout_ms) const {
        unique_lock<mutex> l(arrival_mutex_);
        while (arrival_time_.Load() == 0) {
          int64_t ms_since_registration = MonotonicMillis() - registration_time_;
          int64_t ms_remaining = timeout_ms - ms_since_registration;
          if (ms_remaining <= 0) break;
          if (injection_delay_ > 0) SleepForMs(injection_delay_);
          arrival_cv_.WaitFor(l, ms_remaining * MICROS_PER_MILLI);
        }
        return arrival_time_.Load() != 0;
      }
      

      We should revise the documentation to make it a bit clearer.

      Attachments

        Activity

          People

            fangyurao Fang-Yu Rao
            fangyurao Fang-Yu Rao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: