transient-settings-migration-guide.asciidoc 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. [[transient-settings-migration-guide]]
  2. === Transient settings migration guide
  3. ////
  4. [source,console]
  5. ----
  6. PUT _cluster/settings
  7. {
  8. "transient": {
  9. "cluster.indices.close.enable": false,
  10. "indices.recovery.max_bytes_per_sec": "50mb"
  11. }
  12. }
  13. ----
  14. ////
  15. We no longer recommend using transient cluster settings. You can use transient
  16. settings to make temporary configuration changes to a cluster. However, a
  17. cluster restart or cluster instability can unexpectedly clear these settings,
  18. leading to a potentially undesired cluster configuration.
  19. To avoid this risk, reset any transient settings you've configured on
  20. your cluster. Convert any transient setting you'd like to keep to a persistent
  21. setting, which persists across cluster restarts and cluster instability. You
  22. should also update any custom workflows and applications to use persistent
  23. settings instead of transient settings.
  24. IMPORTANT: Some Elastic products may use transient settings when performing
  25. specific operations. Only reset transient settings configured by you, your
  26. users, or your custom workflows and applications.
  27. To reset and convert transient settings:
  28. . Get a list of any configured transient settings using the
  29. <<cluster-get-settings,cluster get settings API>>.
  30. +
  31. [source,console]
  32. ----
  33. GET _cluster/settings?flat_settings=true&filter_path=transient
  34. ----
  35. // TEST[continued]
  36. +
  37. The API returns transient settings in the `transient` object. If this object is
  38. empty, your cluster has no transient settings, and you can skip the remaining
  39. steps.
  40. +
  41. [source,console-result]
  42. ----
  43. {
  44. "persistent": { ... },
  45. "transient": {
  46. "cluster.indices.close.enable": "false",
  47. "indices.recovery.max_bytes_per_sec": "50mb"
  48. }
  49. }
  50. ----
  51. // TESTRESPONSE[s/"persistent": \{ \.\.\. \},//]
  52. . Copy any settings you'd like to convert into the `persistent` object of a
  53. <<cluster-update-settings,cluster update settings API>> request. In the same
  54. request, reset any transient settings by assigning them a `null` value.
  55. +
  56. [source,console]
  57. ----
  58. PUT _cluster/settings
  59. {
  60. "persistent": {
  61. "cluster.indices.close.enable": false,
  62. "indices.recovery.max_bytes_per_sec": "50mb"
  63. },
  64. "transient": {
  65. "*": null
  66. }
  67. }
  68. ----
  69. // TEST[continued]
  70. . Use the <<cluster-get-settings,cluster get settings API>> to confirm your
  71. cluster has no remaining transient settings.
  72. +
  73. [source,console]
  74. ----
  75. GET _cluster/settings?flat_settings=true
  76. ----
  77. // TEST[continued]
  78. +
  79. If the `transient` object is empty, your cluster has no transient settings.
  80. +
  81. [source,console-result]
  82. ----
  83. {
  84. "persistent": {
  85. "cluster.indices.close.enable": "false",
  86. "indices.recovery.max_bytes_per_sec": "50mb",
  87. ...
  88. },
  89. "transient": {
  90. }
  91. }
  92. ----
  93. // TESTRESPONSE[s/"50mb",/"50mb"/]
  94. // TESTRESPONSE[s/\.\.\.//]
  95. ////
  96. [source,console]
  97. ----
  98. PUT _cluster/settings
  99. {
  100. "persistent" : {
  101. "cluster.indices.close.enable": null,
  102. "indices.recovery.max_bytes_per_sec": null
  103. }
  104. }
  105. ----
  106. // TEST[continued]
  107. ////