elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.72k stars 24.67k forks source link

[Transform] TransformIT.testStartTransform_GivenTimeout_Returns408 may interfere with `_transform/_node_stats` API #109101

Open przemekwitek opened 4 months ago

przemekwitek commented 4 months ago

Elasticsearch Version

main

Installed Plugins

No response

Java Version

bundled

OS Version

n/a

Problem Description

While working on the _transform/_node_stats API I've noticed start-transform-timeout transform created by the TransformIT.testStartTransform_GivenTimeout_Returns408 test case interfering with the assertions on the _transform/_node_stats API response. When we expect no transform tasks in the scheduler, there is one task (start-transform-timeout) existing.

Steps to Reproduce

This came out in CI testing of the PR introducing _transform/_node_stats API (i.e. https://github.com/elastic/elasticsearch/pull/107279).

Logs (if relevant)

java.lang.AssertionError: Failure at iteration 0 (sleepAfterStart=1807ms,force=true): Node stats were: {total={scheduler={registered_transform_count=1}}, j88QlbTQR6O0R7ACnDtuiw={scheduler={registered_transform_count=1, peek_transform=start-transform-timeout}}, IHzZKV2DTLCuGx4Tc7sH3w={scheduler={registered_transform_count=0, peek_transform=null}}, Mfx-FOPWTCOir7xQ9bsZyg={scheduler={registered_transform_count=0, peek_transform=null}}}    

Notice the peek_transform being start-transform-timeout even though these are two separate test cases.

elasticsearchmachine commented 4 months ago

Pinging @elastic/ml-core (Team:ML)