GitHub user zsxwing opened a pull request: https://github.com/apache/spark/pull/22507
[SPARK-25495][SS]FetchedData.reset should reset all fields ## What changes were proposed in this pull request? `FetchedData.reset` should reset `_nextOffsetInFetchedData` and `_offsetAfterPoll`. Otherwise it will cause inconsistent cached data and may make Kafka connector return wrong results. ## How was this patch tested? The new unit test. You can merge this pull request into a Git repository by running: $ git pull https://github.com/zsxwing/spark fix-kafka-reset Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22507.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22507 ---- commit 1c8ef21a0d68154d9229afa2b117d3f19688a1a6 Author: Shixiong Zhu <shixiong@...> Date: 2018-09-20T22:49:19Z fix reset ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org