-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Use 2 nodes in YAML test cluster #94304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Pinging @elastic/es-distributed (Team:Distributed) |
idegtiarenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
(Not required now, just an idea to discuss) Is it also possible to override this in any possible way?
I think it would be great to have something (a system property?) to configure minimum/default amount of nodes for the build if not configured explicitly. This way stateless build would be ready for any possible new modules and statefull will keep using less nodes.
I think it is possible but the main issue is that the YAML tests are not that flexible to assert expectations or setup the test conditionally (e.g. based on whether the target cluster is stateless or stateful). |
|
It's not clear to me whether this is only required for stateless or for core elasticsearch as well. If the former, then we can simply configure the cluster when testing stateless to have multiple nodes. There's no reason to add additional overhead to testing core elasticsearch if it's not strictly required. |
@mark-vieira I understand. The problem is that some of the YAML tests (which are shared between the two) have a |
Right, I don't see how changing the way the cluster is formed in stateful is relevant. If we need multiple nodes when running these shared tests in stateless, then we'll update how the cluster is configured there. I think the bit that is getting missed here is that the YAML is shared between the two, but the code you're updating in this PR is not. |
|
As discussed w/ @mark-vieira on another channel, the change is required ALSO on stateful since the tests that are update in this PR would fail otherwise. |
This reverts commit def4426.
) I have reviewed the tests that motivated the use of a two node cluster for the YAML tests. It seems there is no reason anymore to use `wait_for_status: green` and `number_of_replicas: 0` since the [default values](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-wait-for-active-shards) make sure the write will succeed. There are many newer YAML tests where an index creation is followed by an index operation, w/o waiting for green. With this PR, I'm reverting the changes in #94304, and instead modify the tests.
This reverts commit def4426.
We have some YAML tests that would require at least one
replica (search shard) to run with Stateless and since they
wait for green, they explicitly set replicas to 0 (see e.g.
realtime_refresh). Using 2 nodes
by default makes sure we could run those tests w/o any
changes. IMO, they are pretty important/essential tests.
Relates #94303