Elasticsearch: API for forcing the reload of scripts

Created on 18 Nov 2016  路  6Comments  路  Source: elastic/elasticsearch

Currently (_5.0_) there's no way to explicitly instruct Elasticsearch to reload the disk scripts. Setting a low value for resource.reload.interval is far from optimal. What would really be useful is a way to force the reload whenever it is actually needed.

Our real-life case is when the OS package containing the scripts gets installed, we need them compiled by Elasticsearch right away (because they are used immediately after being placed in their forlder).

:CorInfrScripting >enhancement discuss

Most helpful comment

@acarstoiu thank you for your contribution. if the only purpose of your github account is to be aggressive then I think I'm good and I want to ask you to just move on. There is no room for this here and my and @clintongormley and all of the other contributors and committer time is too precious for this. You are happy to contribute if you can control you communication. if not do me a favor and just use some other _real_ database.

All 6 comments

Instead of an API for reloading scripts, we could either (1) make the reload interval dynamically updatable or (2) use resource watching so we get notified as soon as a file changes.

Bigger question though is: should we keep file based scripts or just support inline/stored scripts? (https://github.com/elastic/elasticsearch/issues/21798)

Removal of static scripts is a security concern, which must be compensated by an access rights mechanism _included_ in the product, not offered as an add-on.

All you have to do to prevent users adding stored scripts is to block the PUT/POST _scripts endpoint. If you're exposing Elasticsearch to the internet without even this basic protection, then you've already lost.

How many _real_ databases have you seen "exposed to the internet"?! The right answer is none.
Do they have access rights built in? Hell, yes.
Why? For the same reason as here, protection from inside access.

@acarstoiu thank you for your contribution. if the only purpose of your github account is to be aggressive then I think I'm good and I want to ask you to just move on. There is no room for this here and my and @clintongormley and all of the other contributors and committer time is too precious for this. You are happy to contribute if you can control you communication. if not do me a favor and just use some other _real_ database.

Well, you and the team have wasted far more time by understanding not what I wrote, but what you think I wrote. Instead of writing your answer in a hurry and the others to cheer you, it would have been far more productive to see that my answer was aimed at this sarcasm:

If you're exposing Elasticsearch to the internet without even this basic protection, then you've already lost.

Also, by _real_ I was referring to _the value of the stored data_, not to the employed technology. So stay cool, I like Es, but I hate unjustified and unasked for arrogance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

clintongormley picture clintongormley  路  3Comments

makeyang picture makeyang  路  3Comments

rpalsaxena picture rpalsaxena  路  3Comments

matthughes picture matthughes  路  3Comments

ppf2 picture ppf2  路  3Comments