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

Use preference("_local") on get calls. #7477

Closed
wants to merge 1 commit into from

Conversation

GaelTadh
Copy link
Contributor

This commit sets preference("_local") on get calls to try and prevent
the GetRequest from being forked off.

@@ -376,11 +378,12 @@ public GetResponse queryScriptIndex(Client client, String scriptLang, String id)
}

public GetResponse queryScriptIndex(Client client, String scriptLang, String id,
long version, VersionType versionType){
long version, VersionType versionType) {
scriptLang = validateScriptLanguage(scriptLang);
return client.prepareGet(SCRIPT_INDEX, scriptLang, id)
.setVersion(version)
.setVersionType(versionType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should have operationThreaded(false) as well?

@s1monw
Copy link
Contributor

s1monw commented Aug 27, 2014

LGTM

This change forces the GetRequest when a script is being loaded from an index
to use preference("_local") and threaded(false) to prevent the script service from
forking for GetRequests.
@GaelTadh GaelTadh closed this Aug 27, 2014
@clintongormley clintongormley changed the title Indexed Scripts : Use preference("_local") on get calls. Indexed Scripts/Templates : Use preference("_local") on get calls. Sep 8, 2014
@clintongormley clintongormley changed the title Indexed Scripts/Templates : Use preference("_local") on get calls. Indexed Scripts/Templates: Use preference("_local") on get calls. Sep 11, 2014
@clintongormley clintongormley changed the title Indexed Scripts/Templates: Use preference("_local") on get calls. Use preference("_local") on get calls. 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
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >enhancement v1.4.0.Beta1 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants