Skip to content

Http handler disconnect fix.#5498

Merged
Shubham8287 merged 4 commits into
masterfrom
shub/fix-http-disconnection
Jul 9, 2026
Merged

Http handler disconnect fix.#5498
Shubham8287 merged 4 commits into
masterfrom
shub/fix-http-disconnection

Conversation

@Shubham8287

@Shubham8287 Shubham8287 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

fix for - #5496.

API and ABI breaking changes

NA

Expected complexity level and risk

1.5

Testing

Smoketest added in base branch.

@Shubham8287 Shubham8287 changed the title http handler disconnect fix. Http handler disconnect fix. Jul 8, 2026
@Shubham8287 Shubham8287 changed the base branch from master to shub/http-disconnect-repro July 8, 2026 13:01
@Shubham8287 Shubham8287 requested review from gefjon and kim and removed request for gefjon July 8, 2026 13:01
Comment thread crates/client-api/src/routes/database.rs Outdated

@gefjon gefjon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems complicated and weird. Why aren't we just tokio::spawning the whole body of the handler function, or rather, the block which contains the connect, call, and disconnect parts?

@Shubham8287

Shubham8287 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Why aren't we just tokio::spawning the whole body of the handler function.

I think that would have worked too. It’s just that the current approach avoids doing the heavy lifting, like the actual reducer or SQL work, if the client disconnects before it starts.

Another reason is convenience: otherwise, everything that goes into tokio::spawn has to be 'static.

Comment thread crates/client-api/src/routes/database.rs Outdated
@Shubham8287 Shubham8287 force-pushed the shub/fix-http-disconnection branch from 747dafb to 64ffd8d Compare July 9, 2026 07:54
@Shubham8287 Shubham8287 requested review from gefjon and kim and removed request for kim July 9, 2026 07:55
@Shubham8287 Shubham8287 force-pushed the shub/fix-http-disconnection branch from 64ffd8d to 297c01d Compare July 9, 2026 08:01
@Shubham8287 Shubham8287 changed the base branch from shub/http-disconnect-repro to master July 9, 2026 08:04
@Shubham8287 Shubham8287 requested a review from kim July 9, 2026 08:04
@Shubham8287 Shubham8287 added this pull request to the merge queue Jul 9, 2026
Merged via the queue into master with commit 62338bd Jul 9, 2026
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants