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 "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/10/02 01:16:00 UTC

[jira] [Resolved] (IMPALA-4802) Fix lifecycle of RuntimeProfile

     [ https://issues.apache.org/jira/browse/IMPALA-4802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Armstrong resolved IMPALA-4802.
-----------------------------------
    Resolution: Duplicate

> Fix lifecycle of RuntimeProfile
> -------------------------------
>
>                 Key: IMPALA-4802
>                 URL: https://issues.apache.org/jira/browse/IMPALA-4802
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 2.9.0
>            Reporter: Tim Armstrong
>            Priority: Major
>              Labels: query-lifecycle
>
> The lifecycle of RuntimeProfile objects and counters is confusing and error-prone. In particular, there are various undocumented requirements about the order destructors are run in.
> Some RuntimeProfile counters are registered to be periodically updated by a thread. This thread touches the counter object, and in some cases other objects (e.g. MemTrackers). References to RuntimeProfile counters are also stored in various places. There are a couple of specific problems I'm aware of:
> * ~RuntimeProfile deregisters counters from being updated by a background thread. It must be run before those counters are destroyed. This currently works because either the RuntimeProfile lives in the same ObjectPool as the counters and ObjectPools destroy objects in FIFO order, or because the RuntimeProfile is destroyed before the ObjectPool.
> * MemTracker destructors reference the consumption() counter, so the MemTracker must be destroyed before the counter. In practice this means that a MemTracker cannot always be managed by an ObjectPool because destructors will be run in the wrong order (unless it is using MemTracker::local_counter_).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org