Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not force flush when ODataUtf8JsonWriter buffer threshold is reached #3102

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

habbes
Copy link
Contributor

@habbes habbes commented Oct 30, 2024

Issues

This pull request fixes #3099 .

This PR is an 8.x port of the following 7.x PR: #3101

Description

This PR removes the "Flush()" call from the FlushIfBufferThresholdReached method and renames the method to DrainBufferIfThresholdReached. This method no longer forces a flush of the underlying stream, instead it only writes to the stream but leaves the stream to decide whether/when to flush. The user can still force a flush by explicitly calling the Flush() method.

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Build and test with one-click build and test script passed

@habbes habbes merged commit 1848964 into main Oct 30, 2024
5 checks passed
@habbes habbes deleted the odl8/avoid-automatic-jsonwriter-flush branch October 30, 2024 16:11
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.

ODataUtf8JsonWriter should not flush the internal stream when buffer is full.
3 participants