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

Fix .script index template. #7500

Closed
wants to merge 1 commit into from

Conversation

GaelTadh
Copy link
Contributor

This commit makes the default number of shards for the .scripts index to 1, it also
forces the auto_expand replicas to 1-all. This change means that script index GET requests to load
scripts from the index should always use the local copy of the scripts index, preventing any network traffic or calls on script GET.

This commit makes the default number of shards for the .scripts index to ````1````, it also
forces the auto_expand replicas to ````1-all````. This change means that script index GET requests to load
scripts from the index should always use the local copy of the scripts index, preventing any network traffic or calls
on script GET.
@s1monw
Copy link
Contributor

s1monw commented Aug 28, 2014

@GaelTadh this looks good to me I think @martijnvg should look over this one more time as well.

@martijnvg
Copy link
Member

@GaelTadh LGTM

@GaelTadh GaelTadh closed this Aug 28, 2014
@clintongormley clintongormley changed the title Indexed Scripts/Templates : Fix .script index template. Indexed Scripts/Templates: Fix .script index template. Sep 26, 2014
@sofianito
Copy link

Is this issue fixed in 1.3.3 and 1.3.4?

Thanks

@clintongormley
Copy link

yes

@sofianito
Copy link

In 1.3.2, the .scripts index was created by default with 5 primary and 1 replica shards.

I just upgraded to 1.3.4, and now the .scripts index is created with 1 primary and 0 replica shards.

The only way I figured out to change the .scripts shards number is to create it manually before indexing any search template:

PUT .scripts
{
  ".scripts": {
    "settings": {
      "index": {
        "number_of_replicas": "1",
        "number_of_shards": "5"
      }
    }
  }
}

Is this the recommended way? Are there any recommended values for the .scripts' replicas and shards numbers?

Thanks.

@clintongormley
Copy link

@sofianito that is the recommended way, but why do you want so many shards for scripts? one shard should be plenty

@sofianito
Copy link

Thank you very much!. I'll ask our Devops team to stick with default value.

@sofianito
Copy link

@clintongormley: One more question. What happens if we have a cluster of two nodes and the master goes down? I understand we won't have failover since the .scripts default replica number is 0. Which means we would need to change the default replica number to 1 at least, isn't it?

Thanks

@clintongormley
Copy link

@sofianito no - if you read the description at the top, you'll see that auto_expand_replicas is set to 1-all, so there should be a copy of this index on every node.

@clintongormley clintongormley changed the title Indexed Scripts/Templates: Fix .script index template. Fix .script index template. Jun 7, 2015
@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Indexed Scripts/Templates labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants