Disallow VersionType.FORCE for GetRequest (#21079)
This doesn't make much sense to have at all, since a user can do a `GET` request without a version of they want to get it unconditionally. Relates to #20995
This commit is contained in:
parent
7751049c14
commit
eb4b6cd816
|
@ -101,6 +101,9 @@ public class GetRequest extends SingleShardRequest<GetRequest> implements Realti
|
|||
validationException = ValidateActions.addValidationError("illegal version value [" + version + "] for version type [" + versionType.name() + "]",
|
||||
validationException);
|
||||
}
|
||||
if (versionType == VersionType.FORCE) {
|
||||
validationException = ValidateActions.addValidationError("version type [force] may no longer be used", validationException);
|
||||
}
|
||||
return validationException;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue