Skip to content

[BUG] [Streaming Indexing] Fix intermittent "The bulk request must be terminated by a newline [\\n]" failures #16214

@reta

Description

@reta

Describe the bug

While bulk ingesting more or less large documents (> 1Kb), the server may reply intermittent with:

{"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})

The issue comes from the fact that Netty could emit chunks partially but have knobs to control this behaviour. This configuration is not exposed by Reactor Netty yet (see please reactor/reactor-netty#3452) but expected to come in the next minor release.

Related component

Indexing

To Reproduce

See please https://build.ci.opensearch.org/job/gradle-check/47073/testReport/org.opensearch.rest/ReactorNetty4StreamingIT/testStreamingRequestOneBatchBySize/

Expected behavior

The large documents should be bulk indexed normally

Additional Details

Plugins
transport-reactor-netty4

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

Host/Environment (please complete the following information):

  • CI

Additional context
reactor/reactor-netty#3452

Metadata

Metadata

Assignees

Labels

IndexingIndexing, Bulk Indexing and anything related to indexingbugSomething isn't workingv2.18.0Issues and PRs related to version 2.18.0v3.0.0Issues and PRs related to version 3.0.0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions