Skip to content

Conversation

@Wzy19930507
Copy link
Contributor

Change stream to for loops, prevent ConcurrentModificationException simultaneously invoke KafkaMessageListenerContainer#setStoppedNormally and ConcurrentMessageListenerContainer#isInExpectedState —— modify property isInExpectedState when invoke stream.allMatch cause list size change threw ConcurrentModificationException by ArrayList$ArrayListSpliterator#tryAdvance.

change stream to for loops, prevent `ConcurrentModificationException` simultaneously invoke `KafkaMessageListenerContainer#setStoppedNormally` and `ConcurrentMessageListenerContainer#isInExpectedState` —— modify property isInExpectedState when invoke stream.allMatch cause list size change threw `ConcurrentModificationException` by `ArrayList$ArrayListSpliterator#tryAdvance`.
@sobychacko sobychacko added this to the 3.2.0-M2 milestone Feb 23, 2024
@sobychacko sobychacko merged commit ee835ce into spring-projects:main Feb 23, 2024
spring-builds pushed a commit that referenced this pull request Feb 23, 2024
Fixes: #3063

* change stream to for loops, prevent `ConcurrentModificationException` from simultaneously invoking `KafkaMessageListenerContainer#setStoppedNormally` and `CMLC#isInExpectedState`
* modify property isInExpectedState when invoking stream.allMatch. This was causing list size to change and thus
   throwing `ConcurrentModificationException` by `ArrayList$ArrayListSpliterator#tryAdvance`.

(cherry picked from commit ee835ce)
@Wzy19930507 Wzy19930507 deleted the concurrent_container_consistency_problem branch February 26, 2024 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants