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

obtaining the value of 'index.merge.scheduler.max_merge_count' from index-name/_settings?include_defaults=true error #51194

Closed
kkewwei opened this issue Jan 19, 2020 · 4 comments
Labels
:Core/Infra/Settings Settings infrastructure and APIs needs:triage Requires assignment of a team area label Team:Core/Infra Meta label for core/infra team

Comments

@kkewwei
Copy link
Contributor

kkewwei commented Jan 19, 2020

ES_VERSION: 7.3.1
OS version: Linux
Description of the problem including expected versus actual behavior:
The paramater value of index.merge.scheduler.max_merge_count obtaining from two different api are different:

  1. The first way:
    curl -XGET 'http://localhost:9200/test1/_settings?pretty&include_defaults=true'
    the result:
{
  "test1": {
    "settings": {
      "index": {
        "provided_name": "test1",
        "merge": {
          "scheduler": {
            "max_thread_count": "1"
          }
        }
      }
    },
    "defaults": {
      "index": {
        "merge": {
          "scheduler": {
            "auto_throttle": "true",
            "max_merge_count": "9"
          }
        }
      }
    }
  }
}
  1. The second way:
PUT test1/_settings
{
"index":{"merge.scheduler.max_merge_count":"7"}
}

The log is like this:
[2020-01-19T17:30:28,079][INFO ][o.e.c.s.IndexScopedSettings] [node-1] updating [index.merge.scheduler.max_merge_count] from [6] to [7]

The value of index.merge.scheduler.max_merge_count from the first way is 9(default value), the value from the second value is 6.

Steps to reproduce:

  1. put the template:
PUT _template/test1
{
  "order": 0,
  "version": 2,
  "index_patterns": [
    "test1"
  ],
  "settings": {
    "index": {
      "merge": {
        "scheduler": {
          "max_thread_count": "1"
        }
      }
    }
  }
}
  1. creating index test1
  2. obtaining by the first way and second way.
@kkewwei kkewwei changed the title obtaining the value of 'index.merge.scheduler.max_merge_count' error obtaining the value of 'index.merge.scheduler.max_merge_count' from index-name/_settings?include_defaults=true error Jan 19, 2020
@cbuescher cbuescher added the :Core/Infra/Settings Settings infrastructure and APIs label Jan 21, 2020
@elasticmachine
Copy link
Collaborator

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

@gaobinlong
Copy link
Contributor

gaobinlong commented Feb 10, 2020

The defaut value of index.merge.scheduler.max_merge_count is the value of index.merge.scheduler.max_thread_count plus 5.

public static final Setting<Integer> MAX_MERGE_COUNT_SETTING =

When max_thread_count is changed, the value of max_merge_count is also changed, we can find the change from the log when we update max_thread_count to 1 by update settings API:

[index] updating [index.merge.scheduler.max_thread_count] from [4] to [1]
[index] updating [index.merge.scheduler.max_merge_count] from [9] to [6]

I think the updated value of max_merge_count is not contained in the settings of IndexMetaData, so we cannot see the real value by GET index settings API.
Should we add index.merge.scheduler.max_merge_count in the settings of IndexMetaData if it has been changed associated with index.merge.scheduler.max_thread_count ?

@kkewwei
Copy link
Contributor Author

kkewwei commented Mar 2, 2020

yes, It may be better to put index.merge.scheduler.max_merge_count to IndexMetaData after updating index.merge.scheduler.max_thread_count.

@rjernst rjernst added the Team:Core/Infra Meta label for core/infra team label May 4, 2020
@rjernst rjernst added the needs:triage Requires assignment of a team area label label Dec 3, 2020
@gwbrown
Copy link
Contributor

gwbrown commented Dec 7, 2020

I believe this is a duplicate of #47890, as this setting depends on the value of another setting. I'm going to close this issue as a duplicate and add this setting to that issue with a link to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Settings Settings infrastructure and APIs needs:triage Requires assignment of a team area label Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

No branches or pull requests

6 participants