HLRC: Add support for reindex rethrottling#33832
Conversation
|
Pinging @elastic/es-core-infra |
There was a problem hiding this comment.
I wasn't sure if I should also include the analogous deleteByQueryRethrottle and updateByQueryRethrottle methods in this PR since I'm not sure how we want to expose the three rethrottling types. Maybe we just want a single method since I thin the Request/Response objects are mostly identical? They even target the same RestAction I think. On the other hand, if at any point in the future we want to untie those, maybe it makes sense to add separate method pairs for each flavour, wdyt?
There was a problem hiding this comment.
I think we said we'd like to line the client up with the REST API. So, yes, I'd make all three of them.
There was a problem hiding this comment.
Okay, thanks. I'd probably prefer to that in a follow-up PR though then, its a bit of a copy/paste job but then we also need to add two more documentation cases.
2893531 to
dc51932
Compare
|
@elasticmachine run gradle build tests |
nik9000
left a comment
There was a problem hiding this comment.
I left a few minor things. Sorry I didn't get to this yesterday!
There was a problem hiding this comment.
hmmmm - I think maybe this should be fixed on update by query and delete by query too.
There was a problem hiding this comment.
I opened a separate PR for this change (#33808), can you review that one first and we can add this change there already? Its a bit unrelated to adding the rethrottle API so I factored it out.
There was a problem hiding this comment.
I added this in a commit there.
There was a problem hiding this comment.
I don't think we need to add it to the url at all if it is POSITIVE_INFINITY.
There was a problem hiding this comment.
We seem to need to add something, because I got errors from RestRethrottleAction#prepareRequest if not setting the parameter at all. AbstractBaseReindexRestHandler.parseRequestsPerSecond seems to be happy with -1 though.
There was a problem hiding this comment.
I think it only needs to add -1 to the rethrottle API. Reindex doesn't need it if it is the default. But I suppose it doesn't hurt to pass it. I withdraw my comment.
There was a problem hiding this comment.
I think we said we'd like to line the client up with the REST API. So, yes, I'd make all three of them.
There was a problem hiding this comment.
Indent these a bit more please!
There was a problem hiding this comment.
Could you name it bulkRequest or something like that?
This change adds support for rethrottling reindex requests to the RestHighLevelClient.
dfb61c0 to
de9ee4f
Compare
This change adds support for rethrottling reindex requests to the RestHighLevelClient.
This change adds support for rethrottling reindex requests to the RestHighLevelClient.
This change adds support for rethrottling reindex requests to the
RestHighLevelClient.