Skip to content

Commit 49842b8

Browse files
committed
Remove @UpdateForV9 annotation from ReindexRequest#failOnSizeSpecified
We do need this check to make sure we don't silently accept requests with ignored `size` parameter specified since `max_docs` is optional. We want to notify users that they must use `max_docs` and specifying `size` is a mistake. This behaviour is tested in the `reindex/20_validation/specifying size fails` test.
1 parent 54eab9d commit 49842b8

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

server/src/main/java/org/elasticsearch/index/reindex/ReindexRequest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.elasticsearch.common.settings.SecureString;
2222
import org.elasticsearch.common.xcontent.XContentHelper;
2323
import org.elasticsearch.core.TimeValue;
24-
import org.elasticsearch.core.UpdateForV9;
2524
import org.elasticsearch.features.NodeFeature;
2625
import org.elasticsearch.index.VersionType;
2726
import org.elasticsearch.index.query.QueryBuilder;
@@ -499,8 +498,6 @@ static void setMaxDocsValidateIdentical(AbstractBulkByScrollRequest<?> request,
499498
}
500499
}
501500

502-
@UpdateForV9(owner = UpdateForV9.Owner.DISTRIBUTED_INDEXING)
503-
// do we still need this ref to [max_docs] or can we remove the field entirely so it's rejected with the default message?
504501
private static void failOnSizeSpecified() {
505502
throw new IllegalArgumentException("invalid parameter [size], use [max_docs] instead");
506503
}

0 commit comments

Comments
 (0)