Response of asynchronous bulk request when a node dies

I have trouble with the response of asynchronous bulk request when a node dies.

For example, I run 1 master node, 2 data nodes, and 2 client nodes (coordinating nodes).

I test on the index with 2 primary shards without replication.

I stop 1 data node, and I execute an async bulk request including a few documents.

I'm confused that the callback for the async request is onFailure(Exception e), not onResponse(BulkResponse bulkResponse). Because I'd to know which documents are indexed successfully and which documents fail. I think if the callback is onResponse(BulkResponse bulkResponse), I can filter failure documents to retry.

Can you explain the problem if I had any mistakes?

Thanks!

If you only have primary shards and no replicas, losing one node will make the index red as one primary is missing. This as far as I remember will prevent all indexing to the index, not only for documents that would have gone to the missing primary shard.

1 Like

After I stop one data node, my index goes red. However, when I put new data, my index continues to add new documents.

2 data node work

1 data node dies

index new documents

I've also tried many times but the ES still index new documents (timeout for new documents routed to die node).

That is not what I expected, so it seems I might be wrong. Would still recommend always running with a replica configured to prevent data loss.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.