Skip to content

Conversation

@benwtrent
Copy link
Member

Manually tested in the following manner:

  • Created and opened A job
  • Created a new index with the same mappings, aliases and properties as the .ml-anomalies-shared index
  • Reindexed .ml-anomalies-shared into new index
  • DELETE .ml-anomalies-shared
  • Created alias for .ml-anomalies-shared to point to new concrete index.
  • Created and opened a new job that needs the shared index.

After the test

GET _cat/aliases?v
alias                     index                           filter routing.index routing.search
.ml-annotations-read      .ml-annotations-6               -      -             -
.ml-annotations-write     .ml-annotations-6               -      -             -
.kibana                   .kibana_1                       -      -             -
.ml-anomalies-.write-jb2  .reindex-6-.ml-anomalies-shared -      -             -
.ml-anomalies-.write-job1 .reindex-6-.ml-anomalies-shared -      -             -
.ml-anomalies-jb2         .reindex-6-.ml-anomalies-shared *      -             -
.ml-anomalies-job1        .reindex-6-.ml-anomalies-shared *      -             -
.ml-anomalies-shared      .reindex-6-.ml-anomalies-shared -      -             -
.ml-state-write           .ml-state                       -      -             -

closes #38773

@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core

Copy link

@droberts195 droberts195 left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for fixing this @benwtrent. I looked through all the other usages of Job.getInitialResultsIndexName and I cannot see another place where it would matter whether the name it returns is an index or an alias.

@benwtrent benwtrent removed the blocker label Feb 13, 2019
@benwtrent benwtrent merged commit 0810eb4 into elastic:master Feb 13, 2019
@benwtrent benwtrent deleted the bug/ml-allow-aliased-results-index-on-put-job branch February 13, 2019 13:35
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Feb 13, 2019
benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Feb 13, 2019
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 13, 2019
* master:
  Improve CcrRepositoryIT mappings tests (elastic#38817)
  Unmute testClusterJoinDespiteOfPublishingIssues and testElectMasterWithLatestVersion (elastic#38555)
  ML allow aliased .ml-anomalies* index on PUT Job (elastic#38821)
  Filter out upgraded version index settings when starting index following (elastic#38838)
  Handle the fact that `ShardStats` instance may have no commit or seqno stats (elastic#38782)
  Edits to text of Profile API documentation (elastic#38742)
  muted test
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Feb 13, 2019
* master:
  Improve CcrRepositoryIT mappings tests (elastic#38817)
  Unmute testClusterJoinDespiteOfPublishingIssues and testElectMasterWithLatestVersion (elastic#38555)
  ML allow aliased .ml-anomalies* index on PUT Job (elastic#38821)
  Filter out upgraded version index settings when starting index following (elastic#38838)
  Handle the fact that `ShardStats` instance may have no commit or seqno stats (elastic#38782)
  Edits to text of Profile API documentation (elastic#38742)
  muted test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Creating a new job fails if it's using a reindexed results index

5 participants