Skip to content

Dry up TransportMasterNodeAction Usage #63524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 12, 2020

Conversation

original-brownbear
Copy link
Contributor

  1. It is confusing and unnecessary to handle response deserialization via inheritance
    and request deserialization via composition. Consistently using composition saves
    hundreds of lines of code and as a matter of fact also removes some indirection in
    transport master node action since we pass a reader down to the response handling anyway.
  2. Defining executor via inheritance but then assuming the return of the method is a constant
    is confusing and again not in line with how we handle the executor definition for other transport
    actions so this was simplified away as well.

Somewhat relates to the dry-up in #63335

1. It is confusing and unnecessary to handle response deserialization via inheritance
and request deserialization via composition. Consistently using composition saves
hundreds of lines of code and as a matter of fact also removes some indirection in
transport master node action since we pass a reader down to the response handling anyway.
2. Defining `executor` via inheritance but then assuming the return of the method is a constant
is confusing and again not in line with how we handle the `executor` definition for other transport
actions so this was simplified away as well.

Somewhat relates to the dry-up in elastic#63335
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 9, 2020
Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

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

LGTM

@original-brownbear
Copy link
Contributor Author

Thanks Rory!

@original-brownbear original-brownbear merged commit 2d1bf0c into elastic:master Oct 12, 2020
@original-brownbear original-brownbear deleted the way-drier-tpmna branch October 12, 2020 09:00
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Oct 26, 2020
1. It is confusing and unnecessary to handle response deserialization via inheritance
and request deserialization via composition. Consistently using composition saves
hundreds of lines of code and as a matter of fact also removes some indirection in
transport master node action since we pass a reader down to the response handling anyway.
2. Defining `executor` via inheritance but then assuming the return of the method is a constant
is confusing and again not in line with how we handle the `executor` definition for other transport
actions so this was simplified away as well.

Somewhat relates to the dry-up in elastic#63335
original-brownbear added a commit that referenced this pull request Oct 26, 2020
1. It is confusing and unnecessary to handle response deserialization via inheritance
and request deserialization via composition. Consistently using composition saves
hundreds of lines of code and as a matter of fact also removes some indirection in
transport master node action since we pass a reader down to the response handling anyway.
2. Defining `executor` via inheritance but then assuming the return of the method is a constant
is confusing and again not in line with how we handle the `executor` definition for other transport
actions so this was simplified away as well.

Somewhat relates to the dry-up in #63335
@original-brownbear original-brownbear restored the way-drier-tpmna branch December 6, 2020 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants