Skip to content

Conversation

@joegallo
Copy link
Contributor

@joegallo joegallo commented Apr 16, 2023

Just a collection of small tweaks. Some commits I've had lying around for a while, mostly to fix little things that are wrong or resolve some complaint or other from IntelliJ.

edit: I temporarily marked this as WIP because there was an unexpected failure from Jenkins. I squared that away, though, so the label has been removed.

It's not actually valid anymore, it should have been removed a while ago.
So just expand all the callers to invoke the other one instead
@joegallo joegallo added :Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.8.0 labels Apr 16, 2023
@joegallo joegallo requested a review from masseyke April 16, 2023 16:02
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@joegallo joegallo added the WIP label Apr 16, 2023
Unmodifiables do allocations on many getters, so it's worth the up-front cost to pre-allocate a better collection that's used a billion times than to cheaply build a worse collection.
The lists don't need to mutable anyway, and copyOf is free in the expected case of the passed-in lists already being immutable.
@joegallo joegallo force-pushed the ingest-document-cleanup branch from 5c71853 to 6d6c7f1 Compare April 16, 2023 21:54
@joegallo joegallo removed the WIP label Apr 16, 2023
The processors and onFailureProcessors are created with a List.copyOf, but this list was not. The end result is that those lists were an ImmutableCollections.ListN while this one was an UnmodifiableList wrapping an ArrayList (read the docs on the toList method for the details). Anyway, it's the tiniest thing, but I'm in a tidying mood, and it pleases me to have these three lists all be the same type.
Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joegallo joegallo merged commit c64c428 into elastic:main Apr 18, 2023
@joegallo joegallo deleted the ingest-document-cleanup branch April 18, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Ingest Node Execution or management of Ingest Pipelines including GeoIP >refactoring Team:Data Management Meta label for data/management team v8.8.0

3 participants