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

ASF GitHub Bot commented on KAFKA-7316:
---------------------------------------

tedyu opened a new pull request #5543: KAFKA-7316 Use of filter method in 
KTable.scala may result in StackOverflowError
URL: https://github.com/apache/kafka/pull/5543
 
 
   Due to lack of conversion to kstream Predicate, existing filter method in 
KTable.scala would result in StackOverflowError.
   
   This PR fixes the bug and adds calls in 
StreamToTableJoinScalaIntegrationTestImplicitSerdes.testShouldCountClicksPerRegion
 to prevent regression.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use of filter method in KTable.scala may result in StackOverflowError
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-7316
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7316
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.0.0
>            Reporter: Ted Yu
>            Priority: Major
>              Labels: scala
>         Attachments: 7316.v1.txt, 7316.v2.txt, 7316.v4.txt
>
>
> In this thread:
> http://search-hadoop.com/m/Kafka/uyzND1dNbYKXzC4F1?subj=Issue+in+Kafka+2+0+0+
> Druhin reported seeing StackOverflowError when using filter method from 
> KTable.scala
> This can be reproduced with the following change:
> {code}
> diff --git 
> a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/StreamToTableJoinScalaIntegrationTestImplicitSerdes.scala
>  b/streams/streams-scala/src/test/scala
> index 3d1bab5..e0a06f2 100644
> --- 
> a/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/StreamToTableJoinScalaIntegrationTestImplicitSerdes.scala
> +++ 
> b/streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/StreamToTableJoinScalaIntegrationTestImplicitSerdes.scala
> @@ -58,6 +58,7 @@ class StreamToTableJoinScalaIntegrationTestImplicitSerdes 
> extends StreamToTableJ
>      val userClicksStream: KStream[String, Long] = 
> builder.stream(userClicksTopic)
>      val userRegionsTable: KTable[String, String] = 
> builder.table(userRegionsTopic)
> +    userRegionsTable.filter { case (_, count) => true }
>      // Compute the total per region by summing the individual click counts 
> per region.
>      val clicksPerRegion: KTable[String, Long] =
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to