Skip to content
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

Removed needless serialization code from TransportIndexReplicationAction and corresponding request object #7211

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@javanna
Copy link
Member

javanna commented Aug 8, 2014

TransportIndexReplicationAction is always executed locally, as an internal action that is part of either delete by query or delete (when routing is required but not specified). Only the corresponding shard level requests get sent over the transport, hence no transport endpoint is needed for the index version, nor the index request itself is supposed to be sent over the transport.

Made all index requests fields final and removed validate methods from index requests as we can rely on validation performed by the callers on main transport actions. No need to validate it again as the request doesn't even get sent over the transport.

Moved classes from org.elasticsearch.action.delete.index to org.elasticsearch.action.delete and adjusted visibility so that internal requests are not public anymore.

Also removed serialization code from IndexDeleteResponse as it never gets sent over transport either.

@javanna javanna self-assigned this Aug 8, 2014

*
* Internal transport action that executes on multiple shards, doesn't register any transport handler as it is always executed locally.
* It relies on a shard sub-action that gets sent over the transport and executed on each of the shard.
* The index provided with the request is expected to be a concrete index, properly resolved by the callers (parent actions).

This comment has been minimized.

Copy link
@jpountz

jpountz Aug 11, 2014

Contributor

thanks for adding javadocs to those classes!

@jpountz

This comment has been minimized.

Copy link
Contributor

jpountz commented Aug 11, 2014

LGTM

@jpountz jpountz removed the review label Aug 11, 2014

Internal: removed needless serialization code from TransportIndexRepl…
…icationAction and corresponding request object

TransportIndexReplicationAction is always executed locally, as an internal action that is part of either delete by query or delete (when routing is required but not specified). Only the corresponding shard level requests get sent over the transport, hence no transport endpoint is needed for the index version, nor the index request itself is supposed to be sent over the transport.

Moved classes from org.elasticsearch.action.delete.index to org.elasticsearch.action.delete and adjusted visibility so that internal requests are not public anymore.

Also removed serialization code from IndexDeleteResponse as it never gets sent over transport either.

Closes #7211

@javanna javanna closed this in c7a9b3d Aug 11, 2014

javanna added a commit that referenced this pull request Aug 11, 2014

Internal: removed needless serialization code from TransportIndexRepl…
…icationAction and corresponding request object

TransportIndexReplicationAction is always executed locally, as an internal action that is part of either delete by query or delete (when routing is required but not specified). Only the corresponding shard level requests get sent over the transport, hence no transport endpoint is needed for the index version, nor the index request itself is supposed to be sent over the transport.

Moved classes from org.elasticsearch.action.delete.index to org.elasticsearch.action.delete and adjusted visibility so that internal requests are not public anymore.

Also removed serialization code from IndexDeleteResponse as it never gets sent over transport either.

Closes #7211

javanna added a commit that referenced this pull request Sep 8, 2014

Internal: removed needless serialization code from TransportIndexRepl…
…icationAction and corresponding request object

TransportIndexReplicationAction is always executed locally, as an internal action that is part of either delete by query or delete (when routing is required but not specified). Only the corresponding shard level requests get sent over the transport, hence no transport endpoint is needed for the index version, nor the index request itself is supposed to be sent over the transport.

Moved classes from org.elasticsearch.action.delete.index to org.elasticsearch.action.delete and adjusted visibility so that internal requests are not public anymore.

Also removed serialization code from IndexDeleteResponse as it never gets sent over transport either.

Closes #7211

@clintongormley clintongormley changed the title Internal: removed needless serialization code from TransportIndexReplicationAction and corresponding request object Internal: Removed needless serialization code from TransportIndexReplicationAction and corresponding request object Sep 8, 2014

@clintongormley clintongormley changed the title Internal: Removed needless serialization code from TransportIndexReplicationAction and corresponding request object Removed needless serialization code from TransportIndexReplicationAction and corresponding request object Jun 7, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.