Skip to content

preserve connection when final empty chunk is left by client#81597

Merged
CheSema merged 3 commits intomasterfrom
chesema-clints-keep-alive
Jun 19, 2025
Merged

preserve connection when final empty chunk is left by client#81597
CheSema merged 3 commits intomasterfrom
chesema-clints-keep-alive

Conversation

@CheSema
Copy link
Member

@CheSema CheSema commented Jun 10, 2025

This changes are inspired by #81595
This only applies only to the client.
When the response is read, theoretically, the last empty chunk could be left in socket.
Before this changes such connection would be closed, because not data is read.
Here I add an attempt to check that only last empty chunk is left.
And if it is true, the connection is reused, otherwise it is closed.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

preserve connection when final empty chunk is left by client

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Jun 10, 2025

Workflow [PR], commit [5f1d7c0]

@clickhouse-gh clickhouse-gh bot added the pr-ci label Jun 10, 2025
@CheSema CheSema marked this pull request as draft June 10, 2025 16:43
@CheSema
Copy link
Member Author

CheSema commented Jun 10, 2025

Draft until tests are fixed.

@Michicosun Michicosun self-assigned this Jun 10, 2025
@CheSema CheSema marked this pull request as ready for review June 12, 2025 08:44
@CheSema CheSema force-pushed the chesema-clints-keep-alive branch from e03084a to 5f1d7c0 Compare June 13, 2025 09:55
@CheSema CheSema requested a review from Michicosun June 19, 2025 14:43
@CheSema CheSema added this pull request to the merge queue Jun 19, 2025
Merged via the queue into master with commit c65aac5 Jun 19, 2025
120 checks passed
@CheSema CheSema deleted the chesema-clints-keep-alive branch June 19, 2025 15:07
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 19, 2025
zvonand pushed a commit to Altinity/ClickHouse that referenced this pull request Oct 30, 2025
…ep-alive

preserve connection when final empty chunk is left by client
zvonand pushed a commit to Altinity/ClickHouse that referenced this pull request Oct 31, 2025
…ep-alive

preserve connection when final empty chunk is left by client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants