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

Duplicate layer of AppendBatchSizeTrackers #5531

Closed
RaulGracia opened this issue Jan 15, 2021 · 0 comments · Fixed by #5567
Closed

Duplicate layer of AppendBatchSizeTrackers #5531

RaulGracia opened this issue Jan 15, 2021 · 0 comments · Fixed by #5567

Comments

@RaulGracia
Copy link
Contributor

Problem description
The writer uses AppendBatchSizeTracker objects to infer the right size of batches to be written to the server. However, currently there are 2 places in which such AppendBatchSizeTracker objects are being instantiated: FlowHandler and TcpClientConnection. In principle, the batching logic should be only in one place, and concretely, at the connection level. This is because, without connection pooling enabled, he number of flows should be equal to the number of connections. With connection pooling enabled, is at the connection level at where we need to track the data being written to the server, which can be a mix of multiple multiplexed flows.

In fact, after a preliminary analysis, it looks like the AppendBatchSizeTracker objects instantiated in FlowHandler are not used at all, so we can safely remove them.

Problem location
Unnecessary AppendBatchSizeTracker objects instantiated in FlowHandler.

Suggestions for an improvement
Remove unnecessary code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment