-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Description
🐛 Bug report
In Kibana testing, we're using es.helpers.bulk
to ingest test data and sometimes, this is ingesting duplicate documents.
Investigation and reproduction was done in this Kibana PR, which also includes the reproduction code: elastic/kibana#228556
A few important details:
- It happens on a low rate and requires many hundred runs to reproduce
- It only reproduced in CI so far - probably because buildkite workers are slower than local developer machines
- It only reproduced so far with ES SSL enabled
- With
maxRetries: 0
on the transport level, the flakiness didn't reproduce - Running the same setup with
es.bulk
instead ofes.helpers.bulk
didn't show the flakiness so far
To reproduce
With ES SSL enabled, repeat the following steps:
- create index
- ingest a single document via
es.helpers.bulk
- refresh index (either as part of
bulk
or separately - check number of documents in the index
- delete index
In some cases after the bulk operation, the index contains 2 documents which are identical except the id.
Expected behavior
The number of documents in that index is always 1.
Node.js version
22.17.1
@elastic/elasticsearch version
9.0.3
Operating system
Buildkite worker / Linux
Any other relevant environment information
No response