Skip to content

Remove backpressure from XMLDoc#2203

Merged
nblumhardt merged 1 commit intoserilog:devfrom
timothycoleman:fix-backpressure-xml-doc
Sep 26, 2025
Merged

Remove backpressure from XMLDoc#2203
nblumhardt merged 1 commit intoserilog:devfrom
timothycoleman:fix-backpressure-xml-doc

Conversation

@timothycoleman
Copy link
Copy Markdown
Contributor

Because backpressure is not applied, instead events are discarded when the queue is full.

The xmldoc for BatchingOptions.QueueLimit says that backpressure is applied when the limit is exceeded.

However, in BatchingSink.cs we see that no backpressure is applied

_queue.Writer.TryWrite(logEvent);

Instead the event is discarded (which is good).

To me it looks like a mistake in the XMLDoc, and this PR adjusts it.

Because backpressure is not applied, instead events are discarded when the queue is full.
@nblumhardt
Copy link
Copy Markdown
Member

Nice spotting - thanks! (Some leftovers from an earlier prototype, IIRC :-))

@nblumhardt nblumhardt merged commit 1f36d2e into serilog:dev Sep 26, 2025
1 check passed
@timothycoleman timothycoleman deleted the fix-backpressure-xml-doc branch September 27, 2025 06:55
@nblumhardt nblumhardt mentioned this pull request Feb 10, 2026
This was referenced Feb 10, 2026
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.

2 participants