Compression should be done on splitted batches #937
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Elasticsearch
http.max_content_length
limit (https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html) is applied on the plain content wether it's compressed or not.In this plugin when compression is enabled, compressed batches are splitted using arbitrary constant
TARGET_BULK_BYTES
of 20mb.It's possible to find cases where uncompressed data are bigger than
http.max_content_length
(100 mb) but smaller thanTARGET_BULK_BYTES
if compressed resulting on413 Request Entity Too Large
. (related to #823)(with elasticsearch
http.max_content_length
defined to 1mb):Furthermore, as the elasticsearch
http.max_content_length
options exists,TARGET_BULK_BYTES
should be configurable (default to the elasticsearch default of 100mb) so people can pick their own value.I think multiple issues/PR are related to this (#785, #833, #786)