You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Marcus Eriksson (Jira)" <ji...@apache.org> on 2025/04/04 14:34:00 UTC

[jira] [Commented] (CASSANDRA-20524) Fix race in CollectionVirtualTableAdapter

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

Marcus Eriksson commented on CASSANDRA-20524:
---------------------------------------------

ci run attached in CASSANDRA-20528

> Fix race in CollectionVirtualTableAdapter
> -----------------------------------------
>
>                 Key: CASSANDRA-20524
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-20524
>             Project: Apache Cassandra
>          Issue Type: Bug
>          Components: Feature/Virtual Tables
>            Reporter: Marcus Eriksson
>            Assignee: Marcus Eriksson
>            Priority: Normal
>             Fix For: 5.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> {{buildDataRangeIterator}} in {{CollectionVirtualTableAdapter}} uses parallel streams, this requires the inner map in {{partitionMap}} to be concurrent, otherwise we could lose rows. This reproduces in {{CollectionVirtualTableAdapterTest}} when run on JDK21 where several threads are actually used when calling {{StreamSupport.stream(..., true)}}. It also reproduces in real scenarios on JDK11 when there are more entries in {{data.spliterator()}}
> I doubt we gain much by having this use parallel streams, we should rewrite it to be a simple for loop.



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