[
https://issues.apache.org/jira/browse/HDDS-9879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-9879:
-----------------------------------
Summary: Memory leak handling block/container token in OM/SCM (was: Memory
leak handling block and container token in OM)
> Memory leak handling block/container token in OM/SCM
> ----------------------------------------------------
>
> Key: HDDS-9879
> URL: https://issues.apache.org/jira/browse/HDDS-9879
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: George Huang
> Assignee: Sumit Agrawal
> Priority: Critical
> Labels: pull-request-available
> Fix For: 1.4.0
>
> Attachments: image-2023-12-08-10-49-39-717.png
>
>
> OOM is observed for FIXED_BYTESTRING_CACHE consuming approx 22GB of memory.
> !image-2023-12-08-10-49-39-717.png|width=702,height=170!
>
> This is called for token converting to proto for: Kind (fixed) and service
> (its either container id and blockId), so service part calling below just
> adding to map consuming memory.
>
> setKindBytes(getFixedByteString(tok.getKind())).
> setServiceBytes(getFixedByteString(tok.getService()));
>
> org.apache.hadoop.ozone.protocolPB.OzonePBHelper#getFixedByteString
> public static ByteString getFixedByteString(Text key) \{
> ByteString value = FIXED_BYTESTRING_CACHE.get(key);
> if (value == null) {
> value = ByteString.copyFromUtf8(key.toString());
> ByteString oldValue = FIXED_BYTESTRING_CACHE.putIfAbsent(key, value);
> return oldValue != null ? oldValue : value;
> }
> return value;
> }
>
> Token service is either containerId or blockId, so no need maintain cache
> for this as most of time, this will be unique.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]