You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Abe Ratnofsky (Jira)" <ji...@apache.org> on 2023/12/05 04:03:00 UTC

[jira] [Commented] (CASSANDRA-19166) StackOverflowError on ALTER after many previous schema changes

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

Abe Ratnofsky commented on CASSANDRA-19166:
-------------------------------------------

I have a patch ready - preparing it on a branch now.

> StackOverflowError on ALTER after many previous schema changes
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-19166
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19166
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Cluster/Schema
>            Reporter: Abe Ratnofsky
>            Assignee: Abe Ratnofsky
>            Priority: Normal
>             Fix For: 4.1.x, 5.0.x
>
>
> Since 4.1, TableMetadataRefCache re-wraps its fields in Collections.unmodifiableMap on every local schema update. This causes TableMetadataRefCache's Map fields to reference chains of nested UnmodifiableMaps. Eventually, this leads to a StackOverflowError on get(), which has to traverse lots of these maps to fetch the actual value.
> https://github.com/apache/cassandra/blob/4059faf5b948c5a285c25fb0f2e4c4288ee7c305/src/java/org/apache/cassandra/schema/TableMetadataRefCache.java#L53
> The issue goes away on restart, since TableMetadataRefCache is reloaded from disk.
> See CASSANDRA-17044, when TableMetadataRefCache was introduced. This issue was discovered on a real test cluster where schema changes were failing, via a heap dump.



--
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