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] Compressed bulk index request failures #16020

Open
thomas-long-f3 opened this issue Sep 20, 2024 · 0 comments
Open

[BUG] Compressed bulk index request failures #16020

thomas-long-f3 opened this issue Sep 20, 2024 · 0 comments
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing untriaged

Comments

@thomas-long-f3
Copy link

thomas-long-f3 commented Sep 20, 2024

Describe the bug

When upgrading from 2.16.0 > 2.17.0, all compressed bulk index requests fail.

Related component

Indexing

To Reproduce

Testing using the OpenSearch docker images. Single node mode, with security disabled.

  1. Generate a simple request:
echo '{ "index": { "_index": "test" } }
{ "hello": "world" }
' > bulk.json
  1. Perform a bulk request uncompressed:
curl http://localhost:9200/_bulk -H 'Content-Type: application/json' --data-binary @bulk.json

Successful response:

{"took":7,"errors":false,"items":[{"index":{"_index":"test","_id":"4pV3D5IBj6h56HIDqJfa","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":1,"_primary_term":1,"status":201}}]}
  1. Now compress the same file:
gzip bulk.json
  1. Send a compressed request:
curl http://localhost:9200/_bulk -H 'Content-Type: application/json' -H 'Content-Encoding: gzip' --data-binary @bulk.json.gz

Request fails:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\\n]"}],"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\\n]"},"status":400}

Note the file does contain a newline at the end, and works as expected on previous OS versions.

Expected behavior

A compressed request would be successful, like the uncompressed request.

Additional Details

Plugins
Please list all plugins currently enabled.

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

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@thomas-long-f3 thomas-long-f3 added bug Something isn't working untriaged labels Sep 20, 2024
@github-actions github-actions bot added the Indexing Indexing, Bulk Indexing and anything related to indexing label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing Indexing, Bulk Indexing and anything related to indexing untriaged
Projects
None yet
Development

No branches or pull requests

1 participant