GitHub user guozhangwang reopened a pull request: https://github.com/apache/kafka/pull/4086
[WIP] KAFKA-6085: Pause all partitions before tasks are initialized Mirror of #4085 against trunk. This PR contains two fixes (one major and one minor): Major: on rebalance, pause all partitions instead of the partitions for tasks with state stores only, so that no records will be returned in the same `pollRecords()` call. Minor: during the restoration phase, when thread state is still PARTITION_ASSIGNED, call consumer.poll with hard-coded pollMs = 0. You can merge this pull request into a Git repository by running: $ git pull https://github.com/guozhangwang/kafka KHotfix-restore-only Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/4086.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 #4086 ---- commit 62bf4784779f7379e849289c4456363f352cb850 Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-10-12T21:18:46Z dummy commit 5726e39cba8a79e6858e8b932c5116b60f2ae314 Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-10-12T21:18:46Z dummy fix issues Remove debugging information commit 8214a3ee340791eb18f7e5fa77f2510470cf977a Author: Matthias J. Sax <matth...@confluent.io> Date: 2017-10-17T00:38:31Z MINOR: update exception message for KIP-120 Author: Matthias J. Sax <matth...@confluent.io> Reviewers: Guozhang Wang <wangg...@gmail.com> Closes #4078 from mjsax/hotfix-streams commit 637b76342801cf4a32c9e65aa89bfe0bf76c24a7 Author: Jason Gustafson <ja...@confluent.io> Date: 2017-10-17T00:49:35Z MINOR: A few javadoc fixes Author: Jason Gustafson <ja...@confluent.io> Reviewers: Guozhang Wang <wangg...@gmail.com> Closes #4076 from hachikuji/javadoc-fixes commit f57c505f6e714b891a6d30e5501b463f14316708 Author: Damian Guy <damian....@gmail.com> Date: 2017-10-17T01:01:32Z MINOR: add equals to SessionWindows Author: Damian Guy <damian....@gmail.com> Reviewers: Guozhang Wang <wangg...@gmail.com>, Matthias J. Sax<matth...@confluent.io>, Bill Bejeck <b...@confluent.io> Closes #4074 from dguy/minor-session-window-equals commit 2f1dd0d4da24eee352f20436902d825d7851c45b Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-10-18T01:27:35Z normal poll with zero during restoration commit 043f28ac89b50f9145ac719449f03a427376dcde Author: Guozhang Wang <wangg...@gmail.com> Date: 2017-10-19T04:58:36Z recheck state change ---- ---