divijvaidya commented on PR #12590: URL: https://github.com/apache/kafka/pull/12590#issuecomment-1252416795
> does the fetch request to close the session fetches any records No, because the fetch request's field for topic partitions is set to empty at `sessionHandler.newBuilder().build()` (line 1963 at Fetcher.java). Also, note that the empty fetch data in the close-fetch-request is asserted in the test at `testFetcherCloseClosesFetchSessionsInBroker` at `assertTrue(builder.fetchData().isEmpty());` On the server side, the server handles a close fetch message by creating a `SessionlessFetchContext` which will return an empty response if FetchData is empty (see FetchSession.scala line 364) @showuon @dajac Please let me know if I am missing anything here. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org