Skip to content

Cleaning up the new ingest builders#105149

Merged
masseyke merged 3 commits intoelastic:mainfrom
masseyke:cleaning-up-ingest-builders
Feb 5, 2024
Merged

Cleaning up the new ingest builders#105149
masseyke merged 3 commits intoelastic:mainfrom
masseyke:cleaning-up-ingest-builders

Conversation

@masseyke
Copy link
Copy Markdown
Member

@masseyke masseyke commented Feb 5, 2024

As originally written in #104927 and #104636, the new ingest request builder objects held onto whatever was passed to them, using that to create the request in the request() method. However, this held onto a lot more memory than the old builders in some cases because XContentBuilders use a lot more memory than the corresponding BytesReference (the object type used by the request itself) would. #105091 fixed the most urgent problem by switching IndexRequestBuilder to only use BytesReference for source data. This PR follows up on that by doing the same for UpdateRequestBuilder. For the sake of consistency with this change, this PR also changes all builders to only hold a single representation for any given request field (e.g. it removes refreshPolicyString and uses only refreshPolicy). This also simplified/removed a lot of the field validation because it is no longer possible to have two different representations of the same field.

@masseyke masseyke added >non-issue :Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. v8.13.0 labels Feb 5, 2024
@masseyke masseyke requested a review from joegallo February 5, 2024 16:29
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Meta label for distributed team. label Feb 5, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@masseyke masseyke merged commit 67e9233 into elastic:main Feb 5, 2024
@masseyke masseyke deleted the cleaning-up-ingest-builders branch February 5, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/CRUD A catch all label for issues around indexing, updating and getting a doc by id. Not search. >non-issue Team:Distributed Meta label for distributed team. v8.13.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants