You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2026/08/10 11:38:00 UTC
[jira] [Commented] (CASSANDRA-21474) NoSpamLogger uses unbounded cache that could lead to memory exhaustion
[ https://issues.apache.org/jira/browse/CASSANDRA-21474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18103355#comment-18103355 ]
Stefan Miklosovic commented on CASSANDRA-21474:
-----------------------------------------------
[~viktoriiakotovets] thank you for the patch, I commented on the PR, once addressed we need to have another +1 for a committer before we merge.
> NoSpamLogger uses unbounded cache that could lead to memory exhaustion
> ----------------------------------------------------------------------
>
> Key: CASSANDRA-21474
> URL: https://issues.apache.org/jira/browse/CASSANDRA-21474
> Project: Apache Cassandra
> Issue Type: Bug
> Components: Observability/Logging
> Reporter: Kathiresan Selvaraj
> Assignee: Viktoriia Kotovets
> Priority: Normal
> Fix For: 6.x, 7.x
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The {{NoSpamLogger}} class maintains an unbounded cache of log statement keys without any eviction policy, which poses a memory leak risk.
> * Unbounded cache growth: The {{lastMessage}} map in {{NoSpamLogger.java}} uses a {{NonBlockingHashMap}} with no size limit or eviction policy.
> * When log messages contain dynamic content (e.g., query strings in tombstone warnings), each unique message creates a new cache entry.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org