[
https://issues.apache.org/jira/browse/CASSANDRA-20690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ariel Weisberg reassigned CASSANDRA-20690:
------------------------------------------
Assignee: Sam Lightfoot
> Infinite loop in MmappedRegions::updateState when MAX_SEGMENT_SIZE < chunkSize
> ------------------------------------------------------------------------------
>
> Key: CASSANDRA-20690
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20690
> Project: Apache Cassandra
> Issue Type: Bug
> Reporter: Sam Lightfoot
> Assignee: Sam Lightfoot
> Priority: Normal
> Attachments: image-2025-05-29-16-49-33-253.png
>
>
> Causing test infinite hangs for
> _org.apache.cassandra.io.sstable.SSTableReaderTest#testSpannedIndexPositions_
> Due to maxSize evaluating to 0, thus spinning forever inside the while loop.
> The code was updated in late April, with the bug introduced in
> [https://github.com/samueldlightfoot/cassandra/commit/12c5495d2f70e0775c6d8d1ffbd00123cc8923ed#diff-500229e3cd80c758761d257cf1145dff6b5f26fb63addeb4db6f789ba403d9aeL69-R186]
> Current code
> {code:java}
> long maxSize = (long) (MAX_SEGMENT_SIZE / chunkSize) * chunkSize; {code}
> Suggested fix
> {code:java}
> long maxSize = Math.max(chunkSize, (long) (MAX_SEGMENT_SIZE / chunkSize) *
> chunkSize); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]