Skip to content
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

[BUG] Unknown Parameter [if_seq_num] Error When Using Optimistic Concurrency Control #165

Closed
noname4life opened this issue Sep 30, 2022 · 0 comments · Fixed by #166
Closed
Labels
bug Something isn't working

Comments

@noname4life
Copy link
Contributor

noname4life commented Sep 30, 2022

What is the bug?

Optimistic concurrency control using the BulkIndexerItem struct fails and returns a 400 Bad Request error with the following type and reason
Type: "illegal_argument_exception"
Reason: "Action/metadata line [1] contains an unknown parameter [if_seq_num]"

How can one reproduce the bug?

  1. Create a BulkIndexer using NewBulkIndexer
  2. Create a BulkIndexerItem with the fields IfSeqNum and IfPrimaryTerm filled up
  3. Call the add() method of the BulkIndexer
  4. Call the Close() method of the BulkIndexer to flush the BulkIndexerItem

What is the expected behavior?

The document should be indexed without any errors being returned

What is your host/environment?

Windows 10
GoLang version 1.18
github.com/opensearch-project/opensearch-go v 1.1.0

Do you have any additional context?

This is caused by the use of "if_seq_num" in the following line. This should be replaced with "if_seq_no" based on the following reference in elastic search regarding optimistic concurrency control.

@noname4life noname4life added the bug Something isn't working label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant