You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (Jira)" <ji...@apache.org> on 2025/05/29 16:00:00 UTC
[jira] [Commented] (CASSANDRA-20690) Infinite loop in MmappedRegions::updateState when MAX_SEGMENT_SIZE < chunkSize
[ https://issues.apache.org/jira/browse/CASSANDRA-20690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17954998#comment-17954998 ]
Brandon Williams commented on CASSANDRA-20690:
----------------------------------------------
/cc [~blambov] [~szymon.miezal]
> 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
> 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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org