Skip to content

docs: epoll's shutdown now sends what the sockets have not taken yet, until the deadline (celeris#760) - #81

Open
FumingPower3925 wants to merge 3 commits into
mainfrom
docs/celeris-760-epoll-send-drain
Open

FumingPower3925 wants to merge 3 commits into
mainfrom
docs/celeris-760-epoll-send-drain

Conversation

@FumingPower3925

@FumingPower3925 FumingPower3925 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Matches goceleris/celeris#807 (fixes celeris#760). Merge after it.

epoll's shutdown (and adaptive's while it runs epoll) now sends what the sockets have not taken yet before it closes the connections, while the shutdown's context is live: until its deadline, or, for a ctx with no deadline such as context.Background(), until that ctx is done; never for longer than Config.WriteTimeout nor for less than 250 ms. The graceful-shutdown page described the old gap ("each connection is then closed without flushing what the socket has not taken yet"); it now says what the native engines do, keeps the old behaviour as the pre-v1.6.0 note, and names io_uring's own 250 ms bound (celeris#806). The shutdown sequence's step 3 and the FAQ's deadline answer gain the send step. The measured line gains the new result (the same 3 MiB response to a 64 KiB-receive-buffer client that starts reading 1 s later arrives whole on std, epoll and adaptive; on io_uring it depends on the kernel, and a CI runner cut it at 2,634,119 of 3,145,728 body bytes: celeris#806's comment).

Round 2 (celeris#807's review): the no-deadline case (a Shutdown(context.Background()) got only the 250 ms floor before #807's round 2) and the WriteTimeout bound are added to the paragraph.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
goceleris-docs d897b9c Commit Preview URL

Branch Preview URL
Sep 29 2026, 11:33 AM

…til it is done, no longer than WriteTimeout (celeris#760)
@FumingPower3925
FumingPower3925 marked this pull request as ready for review September 29, 2026 11:22
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.

1 participant