elasticsearch
elasticsearch copied to clipboard
Utility method to read timeout parameter from REST requests
Closes #108225
Consistent with #107986, this PR adds a utility for retrieving the timeout
request parameter, defaulting it to AcknowledgedRequest#DEFAULT_ACK_TIMEOUT
when it's not present. This represents a slight change in behaviour as instead of using the current ackTimeout
value as a default we move to using the 30s
constant. Though it appears that was the effective behaviour regardless, because all affected AcknowledgedRequests
appear to set ackTimeout
to DEFAULT_ACK_TIMEOUT
value in the constructor.
Additionally, a method getTimeout
was added, which will retrieve the timeout
parameter but returning null when no such parameter is present. This is used mainly when creating descendants of BaseNodesRequest
, and in a few other places where that was the existing behaviour.
Pinging @elastic/es-distributed (Team:Distributed)