[
https://issues.apache.org/jira/browse/CASSANALYTICS-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jyothsna Konisa reassigned CASSANALYTICS-184:
---------------------------------------------
Assignee: Jyothsna Konisa
> CdcState.ReplicaCountSerializer map-size overflow corrupts persisted CDC state
> ------------------------------------------------------------------------------
>
> Key: CASSANALYTICS-184
> URL: https://issues.apache.org/jira/browse/CASSANALYTICS-184
> Project: Apache Cassandra Analytics
> Issue Type: Bug
> Components: CDC
> Reporter: Jyothsna Konisa
> Assignee: Jyothsna Konisa
> Priority: Normal
> Fix For: 0.5
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> CdcState.ReplicaCountSerializer serializes the number of entries in the CDC
> watermarker's replica-count map (numUpdates — the count of distinct mutations
> awaiting sufficient replica acknowledgment) using a signed short (max
> 32,767), this silently overflows once the map grows past that sizeOnce
> corrupted. The bad size gets persisted to Cassandra via SidecarStatePersister
> and re-read on every subsequent restart, causing a permanent crash loop.
> message="Failed to start CDC consumers, cleaning up resources"
> exception=java.lang.IllegalArgumentException: Illegal initial capacity:
> -4366
> at java.util.HashMap.<init>
> at
> org.apache.cassandra.cdc.state.CdcState$ReplicaCountSerializer.read(CdcState.java:404)
> at
> org.apache.cassandra.cdc.state.CdcState$Serializer.read(CdcState.java:380)
> at org.apache.cassandra.cdc.Cdc.start(Cdc.java:137)
> -4366 is the short-overflow wraparound of a map size that grew past 32,767
> under sustained backpressure (CDC write-rejection storms inflating the
> watermarker as mutations piled up waiting for replica quorum). The corrupted
> size persists indefinitely — each restart re-reads the same broken state and
> crashes identically, with no self-heal.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]