In addition to the 409 errros, also ignore valid 201 created document…#8981
Closed
dsteininger86 wants to merge 1 commit intofluent:masterfrom
dsteininger86:fix/out_es_bulk_response_errors_checker
Closed
In addition to the 409 errros, also ignore valid 201 created document…#8981dsteininger86 wants to merge 1 commit intofluent:masterfrom dsteininger86:fix/out_es_bulk_response_errors_checker
dsteininger86 wants to merge 1 commit intofluent:masterfrom
dsteininger86:fix/out_es_bulk_response_errors_checker
Conversation
…s within a "errors=true" elastic bulk response Signed-off-by: Daniel Steininger <145440428+dsteininger86@users.noreply.github.com>
Author
|
ping @PettitWesley |
cosmo0920
reviewed
Aug 15, 2024
| * Check for errors other than version conflict (document already exists) | ||
| * and ignore the created documents. | ||
| */ | ||
| if (item_val.via.i64 != 409 && item_val.via.i64 != 201) { |
Contributor
There was a problem hiding this comment.
I guess that this shouldn't be covered for the following case (error, succeeded, succeeded, error case):
{
"took": 15022,
"errors": true,
"items": [
{
"create": {
"_index": "platform-filebeat-2022.10.26-000671",
"_type": "_doc",
"_id": "f52b988e-ee72-79b4-7854-863f517883d4",
"status": 429,
"error": {
"type": "es_rejected_execution_exception",
"reason": "rejected execution of org.elasticsearch.action.support.replication.TransportWriteAction$1/WrappedActionListener{org.elasticsearch.action.support.replication.ReplicationOperation$$Lambda$6662/0x0000000801b00b08@52f3939d}{org.elasticsearch.action.support.replication.ReplicationOperation$$Lambda$6666/0x0000000801b013a8@1a3c5f59} on EsThreadPoolExecutor[name = elasticsearch-es-default-resized-0/write, queue capacity = 10000, org.elasticsearch.common.util.concurrent.EsThreadPoolExecutor@7675026a[Running, pool size = 4, active threads = 4, queued tasks = 10134, completed tasks = 10934096]]"
}
}
},
{
"create": {
"_index": "platform-filebeat-2022.10.26-000671",
"_type": "_doc",
"_id": "5cb12418-c53d-bcc0-4d8e-25ca508c238c",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"_seq_no": 801595,
"_primary_term": 1,
"status": 201
}
},
{
"create": {
"_index": "platform-filebeat-2022.10.26-000671",
"_type": "_doc",
"_id": "196d923e-0e07-10f0-b091-ae5cf142a7a7",
"_version": 1,
"result": "created",
"_shards": {
"total": 2,
"successful": 2,
"failed": 0
},
"_seq_no": 806215,
"_primary_term": 1,
"status": 201
}
},
{
"create": {
"_index": "platform-filebeat-2022.10.26-000671",
"_type": "_doc",
"_id": "5cb12418-c53d-bcc0-4d8e-25ca508c238c",
"status": 409,
"error": {
"type": "version_conflict_engine_exception",
"reason": "[5cb12418-c53d-bcc0-4d8e-25ca508c238c]: version conflict, document already exists (current version [1])",
"index_uuid": "x9HHbHGpRdiwMjDFgvdETQ",
"shard": "4",
"index": "platform-filebeat-2022.10.26-000671"
}
}
}
]
}
This is because check variable should be replaced by the last failure result.
Am I missing some of the conditions?
Author
|
closed, as the problem seems to be fixed in the following fluent-bit:v3.1.7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…s within a "errors=true" elastic bulk response
It actually only covers this issue: #6341
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.