You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Riza Suminto (Jira)" <ji...@apache.org> on 2020/04/09 17:32:01 UTC
[jira] [Resolved] (IMPALA-9612) Runtime filter wait longer than it
should be
[ https://issues.apache.org/jira/browse/IMPALA-9612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Riza Suminto resolved IMPALA-9612.
----------------------------------
Resolution: Fixed
The fix has been merged. Marking this Jira as resolved.
> Runtime filter wait longer than it should be
> --------------------------------------------
>
> Key: IMPALA-9612
> URL: https://issues.apache.org/jira/browse/IMPALA-9612
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Reporter: Riza Suminto
> Assignee: Riza Suminto
> Priority: Major
>
> In one of my query profile, I found an info string like this:
> Runtime filters: All filters arrived. Waited 59s783ms. Maximum arrival delay: 15s296ms.
> If all runtime filters arrived within 15s296ms, then it should not wait until 59s783ms to proceed.
> Looking at runtime-filter.cc, It looks like there is a potential race condition in function RuntimeFilter::WaitForArrival().
> 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;
> arrival_cv_.WaitFor(l, ms_remaining * MICROS_PER_MILLI);
> }
> return arrival_time_.Load() != 0;
> }
> Between checking arrival_time_.Load() and calling arrival_cv_.WaitFor(), arrival_cv_ might be already signaled by either RuntimeFilter::SetFilter() or RuntimeFilter::Cancel() because they do not acquire arrival_mutex_ first.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org