elasticsearch icon indicating copy to clipboard operation
elasticsearch copied to clipboard

Adjust interception of requests for specific shard IDs

Open gwbrown opened this issue 1 year ago • 3 comments

Some index requests target shard IDs specifically, which may not match the indices that the request targets as given by IndicesRequest, which requires a different interception strategy in order to make sure those requests are handled correctly in all cases.

This PR adds and interface allowing requests to report the shard IDs they target as well as the index names, and adjusts the interception of those requests as appropriate to handle those shard IDs in the cases where they are relevant.

gwbrown avatar Oct 31 '23 23:10 gwbrown

Pinging @elastic/es-security (Team:Security)

elasticsearchmachine avatar Nov 10 '23 00:11 elasticsearchmachine

Hi @gwbrown, I've created a changelog YAML for you.

elasticsearchmachine avatar Nov 10 '23 00:11 elasticsearchmachine

@jakelandis I believe I've addressed the concerns we discussed, could you give me a review?

gwbrown avatar Feb 14 '24 00:02 gwbrown

@jakelandis I yes-and'd your idea into "create a writeable that streams the equivalent to a get request"; I think that makes it a bit more maintainable while still letting us remove the test-only production code. I've also expanded the test coverage to cover x-pack, which had a couple implications I Slack'd you about.

gwbrown avatar Feb 21 '24 00:02 gwbrown

💔 Backport failed

Status Branch Result
8.13 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 101656

elasticsearchmachine avatar Mar 14 '24 19:03 elasticsearchmachine