Workaround for index request without an id being retried that are tripping an assertion in internal engine. (2)
Original commit: elastic/x-pack-elasticsearch@22d5060deb4d4cb1e6e240acbce5d3450ab281af
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.client.Client;
+import org.elasticsearch.common.UUIDs;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
@@ -50,7 +51,8 @@ public class Auditor {
}
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))
.execute(new ActionListener<IndexResponse>() {
@Override
