[
https://issues.apache.org/jira/browse/CASSANDRA-20524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marcus Eriksson updated CASSANDRA-20524:
----------------------------------------
Test and Documentation Plan: ci run
Status: Patch Available (was: Open)
> 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: [email protected]
For additional commands, e-mail: [email protected]