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

add -unbuffered flag to zed and zq #4320

Merged
merged 1 commit into from
Jan 23, 2023
Merged

add -unbuffered flag to zed and zq #4320

merged 1 commit into from
Jan 23, 2023

Conversation

nwt
Copy link
Member

@nwt nwt commented Jan 18, 2023

The -unbuffered flag disables most output buffering. It does this in part at the io.Writer level in zio/emitter and in part by setting zbuf.ScannerBatchSize to 1 to disable batching in non-ZNG scanners created by zbuf.NewScanner.

Limitations:

  • Does not disable output buffering due to ZNG framing (but can be combined with -zngframethresh=0 for that)

  • Does not disable the initial input buffering necessary for auto-detection (but can be combined with -i for that)

  • Does not disable the limited input buffering in most readers

Fixes #1796

The -unbuffered flag disables most output buffering.  It does this in
part at the io.Writer level in zio/emitter and in part by setting
zbuf.ScannerBatchSize to 1 to disable batching in non-ZNG scanners
created by zbuf.NewScanner.

Limitations:

* Does not disable output buffering due to ZNG framing (but can be
  combined with -zngframethresh=0 for that)

* Does not disable the initial input buffering necessary for
  auto-detection (but can be combined with -i for that)

* Does not disable the limited input buffering in most readers
@nwt nwt requested a review from a team January 18, 2023 22:48
@nwt nwt mentioned this pull request Jan 18, 2023
@nwt nwt merged commit 79184e0 into main Jan 23, 2023
@nwt nwt deleted the unbuffered branch January 23, 2023 18:07
@philrz philrz linked an issue Jan 23, 2023 that may be closed by this pull request
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.

nagle-buffered output zq not emitting records for slow, low volume stdin streams
2 participants