Skip to content

Commit d99d158

Browse files
authored
[TRANSFORM] No point sorting preview docs for serialization (#94611)
Currently we serialize the transform preview docs in sorted order. However, when we read them at the other end we deserialize into a hash map, which loses the ordering. Therefore sorting when serializing is pointless. The serverless integration tests are tripping an assertion in writeMapWithConsistentOrder that the map being serialized is not a linked hash map. It makes no difference to the functionality if it is, so this does not affect production clusters (where assertions are disabled). But it causes integration tests to fail.
1 parent 7ff4352 commit d99d158

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/action/PreviewTransformAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public TransformDestIndexSettings getGeneratedDestIndexSettings() {
200200
public void writeTo(StreamOutput out) throws IOException {
201201
out.writeInt(docs.size());
202202
for (Map<String, Object> doc : docs) {
203-
out.writeMapWithConsistentOrder(doc);
203+
out.writeGenericMap(doc);
204204
}
205205
generatedDestIndexSettings.writeTo(out);
206206
}

0 commit comments

Comments
 (0)