Skip to content
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

Regression: Cluster with custom similarity settings fails to start after upgrade #50763

Closed
not-napoleon opened this issue Jan 8, 2020 · 2 comments · Fixed by #50851
Closed
Labels
>bug :Core/Infra/Plugins Plugin API and infrastructure >regression :Search/Search Search-related issues that do not fall into other categories

Comments

@not-napoleon
Copy link
Member

not-napoleon commented Jan 8, 2020

When trying to upgrade an index with custom similarity settings from 7.1.0, the node fails to start with an exception similar to "Caused by: java.lang.IllegalArgumentException: Unknown settings for similarity of type [BM25]: [normalization.h2.c, normalization, after_effect, basic_model]" . We observed this happening upgrading from 7.1.0 to 7.5.0 and also from 7.1.0 to 7.1.1 . This appears to be the same issue as #25350.

To reproduce, start up a 7.1.0 cluster, and apply the following settings:

PUT /i
{
  "settings": {
    "index": {
      "similarity": {
        "my_similarity": {
          "after_effect": "l",
          "basic_model": "g",
          "normalization": "h2",
          "normalization.h2.c": "3.0",
          "type": "DFR"
        }
      }
    }
  }
}

Then attempt to upgrade that cluster. (Thank you @DaveCTurner for concise repro steps)

@not-napoleon not-napoleon added >bug >regression :Search/Search Search-related issues that do not fall into other categories :Core/Infra/Plugins Plugin API and infrastructure labels Jan 8, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Plugins)

jimczi added a commit to jimczi/elasticsearch that referenced this issue Jan 10, 2020
This change fixes the upgrade of index metadata that contain
a custom similarity with options that are not compatible with BM25.
The upgrade doesn't need a real similarity service so we fake one that
resolves all custom similarity to BM25 but this logic fails because the
BM25 provider checks that all options are compatible. This commit removes
the verification step as it is not needed during the upgrade (the verification
is done when the index is restored/opened).

Closes elastic#50763
jimczi added a commit that referenced this issue Jan 10, 2020
This change fixes the upgrade of index metadata that contain
a custom similarity with options that are not compatible with BM25.
The upgrade doesn't need a real similarity service so we fake one that
resolves all custom similarity to BM25 but this logic fails because the
BM25 provider checks that all options are compatible. This commit removes
the verification step as it is not needed during the upgrade (the verification
is done when the index is restored/opened).

Closes #50763
jimczi added a commit that referenced this issue Jan 10, 2020
This change fixes the upgrade of index metadata that contain
a custom similarity with options that are not compatible with BM25.
The upgrade doesn't need a real similarity service so we fake one that
resolves all custom similarity to BM25 but this logic fails because the
BM25 provider checks that all options are compatible. This commit removes
the verification step as it is not needed during the upgrade (the verification
is done when the index is restored/opened).

Closes #50763
jimczi added a commit that referenced this issue Jan 10, 2020
This change fixes the upgrade of index metadata that contain
a custom similarity with options that are not compatible with BM25.
The upgrade doesn't need a real similarity service so we fake one that
resolves all custom similarity to BM25 but this logic fails because the
BM25 provider checks that all options are compatible. This commit removes
the verification step as it is not needed during the upgrade (the verification
is done when the index is restored/opened).

Closes #50763
SivagurunathanV pushed a commit to SivagurunathanV/elasticsearch that referenced this issue Jan 23, 2020
This change fixes the upgrade of index metadata that contain
a custom similarity with options that are not compatible with BM25.
The upgrade doesn't need a real similarity service so we fake one that
resolves all custom similarity to BM25 but this logic fails because the
BM25 provider checks that all options are compatible. This commit removes
the verification step as it is not needed during the upgrade (the verification
is done when the index is restored/opened).

Closes elastic#50763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Plugins Plugin API and infrastructure >regression :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants