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

Projects
None yet
5 participants
@GaelTadh
Copy link
Contributor

GaelTadh commented Aug 28, 2014

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.

Indexed Scripts/Templates : Fix .script index template.
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 s1monw added bug labels Aug 28, 2014

@s1monw

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

martijnvg commented Aug 28, 2014

@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

This comment has been minimized.

Copy link

sofianito commented Oct 29, 2014

Is this issue fixed in 1.3.3 and 1.3.4?

Thanks

@clintongormley

This comment has been minimized.

Copy link
Member

clintongormley commented Oct 29, 2014

yes

@sofianito

This comment has been minimized.

Copy link

sofianito commented Oct 29, 2014

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

This comment has been minimized.

Copy link
Member

clintongormley commented Oct 29, 2014

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

@sofianito

This comment has been minimized.

Copy link

sofianito commented Oct 29, 2014

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

@sofianito

This comment has been minimized.

Copy link

sofianito commented Oct 31, 2014

@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

This comment has been minimized.

Copy link
Member

clintongormley commented Nov 1, 2014

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.