Browse Source

Adjust copy settings on resize BWC version

This commit adjusts the BWC version for copy settings on resize
operations after the behavior was backported to 6.x.
Jason Tedor 7 năm trước cách đây
mục cha
commit
5de6f4ff7b

+ 2 - 2
docs/CHANGELOG.asciidoc

@@ -24,8 +24,6 @@
 
 === Enhancements
 
-<<copy-source-settings-on-resize, Allow copying source settings on index resize operations>> ({pull}30255[#30255])
-
 === Bug Fixes
 
 Fail snapshot operations early when creating or deleting a snapshot on a repository that has been
@@ -41,6 +39,8 @@ written to by an older Elasticsearch after writing to it with a newer Elasticsea
 
 === Enhancements
 
+<<copy-source-settings-on-resize, Allow copying source settings on index resize operations>> ({pull}30255[#30255])
+
 === Bug Fixes
 
 Do not ignore request analysis/similarity settings on index resize operations when the source index already contains such settings ({pull}30216[#30216])

+ 1 - 1
docs/reference/indices/shrink-index.asciidoc

@@ -127,7 +127,7 @@ during a shrink operation. With the exception of non-copyable settings, settings
 from the source index can be copied to the target index by adding the URL
 parameter `copy_settings=true` to the request.
 
-deprecated[7.0.0, `copy_settings` will default to `true` in 8.x and will be removed in 9.0.0]
+deprecated[6.4.0, `copy_settings` will default to `true` in 8.x and will be removed in 9.0.0]
 
 [float]
 === Monitoring the shrink process

+ 1 - 1
docs/reference/indices/split-index.asciidoc

@@ -183,7 +183,7 @@ during a split operation. With the exception of non-copyable settings, settings
 from the source index can be copied to the target index by adding the URL
 parameter `copy_settings=true` to the request.
 
-deprecated[7.0.0, `copy_settings` will default to `true` in 8.x and will be removed in 9.0.0]
+deprecated[6.4.0, `copy_settings` will default to `true` in 8.x and will be removed in 9.0.0]
 
 [float]
 === Monitoring the split process

+ 0 - 17
docs/reference/migration/migrate_7_0/api.asciidoc

@@ -65,20 +65,3 @@ deprecated in 6.3.0 and now removed in 7.0.0.
 In the past, `fields` could be provided either as a parameter, or as part of the request
 body. Specifying `fields` in the request body as opposed to a parameter was deprecated
 in 6.4.0, and is now unsupported in 7.0.0.
-
-[[copy-source-settings-on-resize]]
-==== Copying source settings during shrink/split operations
-
-In prior versions of Elasticsearch, resize operations (shrink/split) would only
-copy `index.analysis`, `index.similarity`, and `index.sort` settings from the
-source index. Elasticsearch 7.0.0 introduces a request parameter `copy_settings`
-which will copy all index settings from the source except for non-copyable index
-settings. This parameter defaults to `false` in 7.x, is immediately deprecated
-in 7.0.0, will only be able to be set to `true` in 8.x, and will be removed in
-9.0.0. Note than when this parameter is used it means that all copyable settings
-will be copied; this includes the index blocks that must be put in place for a
-resize operation, and any allocation settings put in place in preparation for
-executing the resize operation. If you use this parameter, you will either have
-to follow up the operation with a request to adjust to the desired settings on
-the target index, or send the desired value of these settings with the resize
-operation.

+ 2 - 2
rest-api-spec/src/main/resources/rest-api-spec/test/indices.shrink/30_copy_settings.yml

@@ -1,8 +1,8 @@
 ---
 "Copy settings during shrink index":
   - skip:
-      version: " - 6.99.99"
-      reason:  copy_settings did not exist prior to 7.0.0
+      version: " - 6.3.99"
+      reason:  copy_settings did not exist prior to 6.4.0
       features: "warnings"
 
   - do:

+ 2 - 2
rest-api-spec/src/main/resources/rest-api-spec/test/indices.split/30_copy_settings.yml

@@ -1,8 +1,8 @@
 ---
 "Copy settings during split index":
   - skip:
-      version: " - 6.99.99"
-      reason:  copy_settings did not exist prior to 7.0.0
+      version: " - 6.3.99"
+      reason:  copy_settings did not exist prior to 6.4.0
       features: "warnings"
 
   - do:

+ 2 - 2
server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequest.java

@@ -98,7 +98,7 @@ public class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements
         } else {
             type = ResizeType.SHRINK; // BWC this used to be shrink only
         }
-        if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
+        if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
             copySettings = in.readBoolean();
         } else {
             copySettings = false;
@@ -113,7 +113,7 @@ public class ResizeRequest extends AcknowledgedRequest<ResizeRequest> implements
         if (out.getVersion().onOrAfter(ResizeAction.COMPATIBILITY_VERSION)) {
             out.writeEnum(type);
         }
-        if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
+        if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
             out.writeBoolean(copySettings);
         }
     }