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

[BUG]For ES version after 6.0.0 the index seems to be created with " index.mapper.dynamic " attribute which ideally it should not have #3879

Closed
niravpi opened this issue Jul 13, 2022 · 13 comments · Fixed by #11193
Assignees
Labels
bug Something isn't working Indexing & Search v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0

Comments

@niravpi
Copy link

niravpi commented Jul 13, 2022

Describe the bug
For ES version after 6.0.0 seen some specific case where the index seems to be created with " index.mapper.dynamic " attribute which should not happened as while I am trying the change this setting getting below error

"error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Setting index.mapper.dynamic was removed after version 6.0.0"
  },
  "status" : 400

But where as I can see that some index which are created in the 1.0.0 version are having this settings which we are not able to change or remove

Sample settings

"index" : {
        "creation_date_string" : "2022-03-03T00:45:30.711Z",
        "refresh_interval" : "30s",
        "number_of_shards" : "5",
        "provided_name" : "index name",
        "mapper" : {
          "dynamic" : "false"
        },
        "creation_date" : "1646268330711",
        "number_of_replicas" : "3",
        "uuid" : "Some UUID",
        "version" : {
          "created_string" : "1.0.0",
          "created" : "135217827"
        }
      }

Expected behavior
Newly created index on ES version above 6.0.0 should not have this settings

@niravpi niravpi added bug Something isn't working untriaged labels Jul 13, 2022
@niravpi niravpi changed the title [BUG]For ES version after 6.0.0 the index seems to be created with " index.mapper.dynamic " attribute which should not [BUG]For ES version after 6.0.0 the index seems to be created with " index.mapper.dynamic " attribute whic ideally it should not have Jul 13, 2022
@dblock
Copy link
Member

dblock commented Jul 13, 2022

Is this still the case in 2.x? Do you have repro steps, please?

@shwetathareja
Copy link
Member

shwetathareja commented Jul 14, 2022

@dblock : this code path has not changed in OpenSearch 2.0, code reference It might still be there. I will take a look at this one.

@niravpi niravpi changed the title [BUG]For ES version after 6.0.0 the index seems to be created with " index.mapper.dynamic " attribute whic ideally it should not have [BUG]For ES version after 6.0.0 the index seems to be created with " index.mapper.dynamic " attribute which ideally it should not have Jul 28, 2022
@derek-ho
Copy link
Contributor

derek-ho commented Oct 13, 2022

Hey folks, I am trying to connect Jaeger with Opensearch and getting this same error on startup of the Jaeger Collector. Could somebody take a look? Happy to hop on a call and try to reproduce this issue @dblock @shwetathareja

@shwetathareja
Copy link
Member

shwetathareja commented Oct 14, 2022

@derek-ho : can you provide details on Jaeger Collector? which version are you using? How does it connect? Is the index created manually or using auto creation? is the error for existing index or during creation?

@derek-ho
Copy link
Contributor

I am using Jaeger version 1.38.1. I believe it is connecting with the ES go client:
https://github.com/jaegertracing/jaeger/blob/3d67ac86f53866332568b0f542265b00d86407fc/plugin/storage/es/spanstore/writer.go#L48
https://github.com/jaegertracing/jaeger/blob/3d67ac86f53866332568b0f542265b00d86407fc/plugin/storage/es/spanstore/writer.go#L110
But I am not sure. I think it is getting auto created, and the error seems to imply it is for creating the index itself. Let's jump on a call next week to dig deeper.

@derek-ho
Copy link
Contributor

They do not have a dedicated Opensearch connection package yet - this is using the same one that is used to connect to Elasticsearch; that is one of the TODO's. However, I would like to investigate whether this problem might arise when a Opensearch connection package is written as well.

@shutlle
Copy link

shutlle commented Oct 26, 2022

Hi, we have same error with OpenSearch 2.2.0 and Jaeger 1.38.1
Any additional information about this issue?

@derek-ho
Copy link
Contributor

@shutlle can you run with --es.version=7? That fixed the issue for me.

@hardened-user
Copy link

@derek-ho it's work

@peternied
Copy link
Member

peternied commented Nov 14, 2023

Saw this issue today, I'll see about making this more addressable so that you can 'unset' the value rather than being stuck deleting the index.

e.g the following would be allowed

PUT /index-1/_settings
{
   "index": {
      "mapper.dynamic": null
    }
}

@peternied
Copy link
Member

See #11193 for the fix, I ended up expanding the fix to allow the setting value to be null or false - this should mitigate migration issues when no backwards capability issue would occur. This would also allow indices that were using this setting to be unset so they can be cleanly migrated.

@reta reta added the v2.13.0 Issues and PRs related to version 2.13.0 label Feb 21, 2024
@reta reta added the v3.0.0 Issues and PRs related to version 3.0.0 label Feb 21, 2024
@mgodwan
Copy link
Member

mgodwan commented Feb 21, 2024

@peternied Do we know the root cause around how this setting was added to the index in OS 1.0 created index in the first place? I was trying to go through the issue but could not find the root cause through the trail. Is it just part of include_defaults response?

@peternied
Copy link
Member

root cause around how this setting was added to the index in OS 1.0 created index in the first place

@mgodwan No, in the cases where I've encountered this issue the cluster operator did not remember the historical context and I didn't find any traces of how the index came to be. I'm going to close this specific issue as I've got a fix for this case, lets keep tracking the root cause investigation in [1].

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Search Project Board Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Indexing & Search v2.13.0 Issues and PRs related to version 2.13.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

10 participants