Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ tests:
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=transform/transforms_reset/Test reset running transform}
issue: https://github.com/elastic/elasticsearch/issues/117473
- class: org.elasticsearch.xpack.ml.integration.RegressionIT
method: testTwoJobsWithSameRandomizeSeedUseSameTrainingSet
issue: https://github.com/elastic/elasticsearch/issues/117805
- class: org.elasticsearch.packaging.test.ArchiveTests
method: test44AutoConfigurationNotTriggeredOnNotWriteableConfDir
issue: https://github.com/elastic/elasticsearch/issues/118208
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ public void testStopAndRestart() throws Exception {
public void testTwoJobsWithSameRandomizeSeedUseSameTrainingSet() throws Exception {
String sourceIndex = "regression_two_jobs_with_same_randomize_seed_source";
indexData(sourceIndex, 100, 0);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indexData is calling directly client().admin().indices().prepareCreate() instead of prepareCreate() of the test framework. This ensures that the index has always 1 shard.

However, it still can have multiple segments which then leads to non-deterministics order in which the reservoir sampling might get the documents. Hence, we need to fix both the shards and the segments to 1.

// Force merge to single segment to ensure deterministic _doc sort order during reindexing
// Without this, multiple segments or segment merges can cause non-deterministic document processing order
client().admin().indices().prepareForceMerge(sourceIndex).setMaxNumSegments(1).setFlush(true).get();

String firstJobId = "regression_two_jobs_with_same_randomize_seed_1";
String firstJobDestIndex = firstJobId + "_dest";
Expand Down