mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 16:39:11 +00:00
Workaround for index request without an id being retried that are tripping an assertion in internal engine. (2)
Original commit: elastic/x-pack-elasticsearch@22d5060deb
This commit is contained in:
parent
ad4218320c
commit
2059b91620
@ -10,6 +10,7 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
|
|||||||
import org.elasticsearch.action.ActionListener;
|
import org.elasticsearch.action.ActionListener;
|
||||||
import org.elasticsearch.action.index.IndexResponse;
|
import org.elasticsearch.action.index.IndexResponse;
|
||||||
import org.elasticsearch.client.Client;
|
import org.elasticsearch.client.Client;
|
||||||
|
import org.elasticsearch.common.UUIDs;
|
||||||
import org.elasticsearch.common.logging.Loggers;
|
import org.elasticsearch.common.logging.Loggers;
|
||||||
import org.elasticsearch.common.xcontent.ToXContent;
|
import org.elasticsearch.common.xcontent.ToXContent;
|
||||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||||
@ -50,7 +51,8 @@ public class Auditor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void indexDoc(String type, ToXContent toXContent) {
|
private void indexDoc(String type, ToXContent toXContent) {
|
||||||
client.prepareIndex(NOTIFICATIONS_INDEX, type)
|
// TODO: (norelease): Fix the assertion tripping in internal engine for index requests without an id being retried:
|
||||||
|
client.prepareIndex(NOTIFICATIONS_INDEX, type, UUIDs.base64UUID())
|
||||||
.setSource(toXContentBuilder(toXContent))
|
.setSource(toXContentBuilder(toXContent))
|
||||||
.execute(new ActionListener<IndexResponse>() {
|
.execute(new ActionListener<IndexResponse>() {
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user