Skip to content

[BUG] Upsert action requires existing document in OpenSearch #4036

@graytaylor0

Description

@graytaylor0

Describe the bug
The upsert action is supposed to insert a document if it does not exist, and update a document if it does exist. However, the upsert action as part of a bulk request from the opensearch sink receives a document not found error from OpenSearch.

To Reproduce
Steps to reproduce the behavior:

  1. Configure and start a pipeline with an opensearch sink with action: upsert
  2. Send an Event that does not have an existing document_id for that document in the OpenSearch index
  3. Observe the error
WARN  org.opensearch.dataprepper.plugins.sink.opensearch.BulkRetryStrategy - operation 
= Update, error = [2]: document missing

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. Ubuntu 20.04 LTS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions