-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[exporter/elasticsearch] Limit bulk request size to avoid 413 Entity Too Large #36396
[exporter/elasticsearch] Limit bulk request size to avoid 413 Entity Too Large #36396
Conversation
flush::bytes
flush::bytes
flush::bytes
in sync bulk indexer
Also benched with ~5MB vs ~1MB vs 95MB flush::bytes to an Elastic Cloud 64GB Elasticsearch, with num_workers=1: 5MB:
1MB:
95MB:
|
flush::bytes
in sync bulk indexerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to change the default max size items? Other changes LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
}, | ||
}, | ||
Flush: FlushSettings{ | ||
Bytes: 5e+6, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe consider moving these defaults to some constant vars at some point. (not for this PR)
Co-authored-by: Christos Markou <chrismarkou92@gmail.com>
Description
Limit the bulk request size to roughly
flush::bytes
for sync bulk indexer.Sync bulk indexer is used when
batcher::enabled
is either true or false. In order words, sync bulk indexer is not used when batcher config is undefined.Change
flush::bytes
to always measure in uncompressed bytes.Change default
batcher::max_size_items
to0
as bulk request size limit is now more effectively enforced byflush::bytes
.Link to tracking issue
Fixes #36163
Testing
Modified BenchmarkExporter to run with
{name: "xxlarge_batch", batchSize: 1000000},
and removedbatcher::max_size_items
and added a log line for compressed and uncompressed buffer size to reproduce the error.With this PR, every flush logs and there is no error.
Documentation