-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Old format of stored scripts is not dropped #47593
Comments
Pinging @elastic/es-core-infra (:Core/Infra/Scripting) |
After some more consideration, the best fix is to simply drop all old-style format scripts from the cluster state. As they were already inaccessible there is no expectation any consumers would want old scripts popping back into view along with the fact they may no longer match possibly conflicting newer versions in the new-style format. |
This PR fixes (#47593). Stored scripts with the old-style id of lang#id are saved through the upgrade process but are no longer accessible in recent versions. This fix will drop those scripts altogether since there is no way for a user to access them.
This PR fixes (#47593). Stored scripts with the old-style id of lang#id are saved through the upgrade process but are no longer accessible in recent versions. This fix will drop those scripts altogether since there is no way for a user to access them.
Fixed by #48078 |
In 5.6 there are two types of id's for stored scripts. 1) lang#id and 2) id -- The first one was deprecated; however, since both could be referenced during script usage when a put stored script request was issued, both types were added for the same script. Example:
results in the following:
When upgrading to 6.0, though, it's no longer possible to get/put/delete stored scripts with the deprecated id format (lang#id), but we still load the scripts saved in the cluster state from the previous version with that format and never convert it to the id only type. This means legacy scripts exist in the cluster state that cannot be accessed or deleted. The potential fix is to convert the old style scripts to the new style in all situations.
The text was updated successfully, but these errors were encountered: