Skip to content

Replace LayoutStrategy buffered_bytes with a buffered bytes tracker#8961

Open
robert3005 wants to merge 2 commits into
developfrom
rk/notodobytes
Open

Replace LayoutStrategy buffered_bytes with a buffered bytes tracker#8961
robert3005 wants to merge 2 commits into
developfrom
rk/notodobytes

Conversation

@robert3005

Copy link
Copy Markdown
Contributor

For file writing it's very useful to know how much data is already piped through
the writer. We have a CountingWriter but that can only measure flushed bytes. We
want to measure the bytes that the writer holds buferred.

Instead of recursive buffered_bytes which has numerous problems with stateless
strategies and double counting we add a bufferedbytestracker to the
layoutwritercontext and let writers report buffered bytes there

Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
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