[ 
https://issues.apache.org/jira/browse/IMPALA-14612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18046714#comment-18046714
 ] 

ASF subversion and git services commented on IMPALA-14612:
----------------------------------------------------------

Commit 0c9fe293c317f9135427f6a68f64c92abdfe0231 in impala's branch 
refs/heads/master from Yida Wu
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=0c9fe293c ]

IMPALA-14612: Add global metrics for admission state map size

We need better observability for the admission state map to warn
about potential memory leaks.

The admission state map tracks queries currently being processed or
queued. An entry is added when a query is submitted for admission.
The entry is removed when the query finishes execution, is rejected
by admission control, times out while queuing, or is cancelled. If
the removal logic is missed due to bugs, the map size grows
indefinitely, causing a memory leak. We have observed cases where
admission state entries were not released, causing memory leaks in
admissiond.

Adds the metric admission-control-service.num-queries and its high
water mark to track the number of active entries. This patch updates
GenericShardedQueryMap to support an optional
AtomicHighWaterMarkGauge. When set, the map automatically increments
or decrements the gauge during Add and Delete operations. This
ensures the metric accurately reflects the map size without requiring
manual updates at every call site.

Tests:
Updated and passed test_admission_state_map_mem_leak to verify the
metrics.

Change-Id: Ie803aabf8d91b6381c5d0d7534cd9c9fc2166a73
Reviewed-on: http://gerrit.cloudera.org:8080/23760
Reviewed-by: Riza Suminto <[email protected]>
Reviewed-by: Jason Fehr <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Add global metrics for admission state map size
> -----------------------------------------------
>
>                 Key: IMPALA-14612
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14612
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend
>    Affects Versions: Impala 4.5.0
>            Reporter: Yida Wu
>            Assignee: Yida Wu
>            Priority: Major
>
> We need to enhance observability for the admission state map to better detect 
> memory leaks. We have already found two issues that admission state entries 
> were not properly released, resulting in leaks.
> https://github.com/apache/impala/blob/master/be/src/scheduling/admission-control-service.h#L140



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to