Skip to content

Conversation

@s1monw
Copy link
Contributor

@s1monw s1monw commented Jan 26, 2017

At this point AbstractSearchAsyncAction is just a base-class for the first phase of a search where we have multiple replicas
for each shardID. If one of them is not available we move to the next one. Yet, once we passed that first stage we have to work with
the shards we succeeded on the initial phase.
Unfortunately, subsequent phases are not fully detached from the initial phase since they are all non-static inner classes.
In future changes this will be changed to detach the inner classes to test them in isolation and to simplify their creation.
The AbstractSearchAsyncAction should be final and it should just get a factory for the next phase instead of requiring subclasses
etc.

@s1monw s1monw added :Search/Search Search-related issues that do not fall into other categories >enhancement review v5.3.0 v6.0.0-alpha1 labels Jan 26, 2017
@s1monw s1monw requested a review from jpountz January 26, 2017 09:02
@s1monw
Copy link
Contributor Author

s1monw commented Jan 26, 2017

@elasticmachine test this please

Copy link
Contributor

@jpountz jpountz left a comment

Choose a reason for hiding this comment

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

+1 to detaching phases to make them easier to test/reason about. It is hard to dig into such a change but I got the idea and did not see anything bad, so if tests are passing I'm confident this is good. 👍

At this point AbstractSearchAsyncAction is just a base-class for the first phase of a search where we have multiple replicas
for each shardID. If one of them is not available we move to the next one. Yet, once we passed that first stage we have to work with
the shards we succeeded on the initial phase.
Unfortunately, subsequent phases are not fully detached from the initial phase since they are all non-static inner classes.
In future changes this will be changed to detach the inner classes to test them in isolation and to simplify their creation.
The AbstractSearchAsyncAction should be final and it should just get a factory for the next phase instead of requiring subclasses
etc.
… an exception we handle it correctly in a streamlined fashion
@s1monw s1monw force-pushed the refactor_search_phases branch from 1628d7c to b7e53e5 Compare January 26, 2017 17:04
@s1monw
Copy link
Contributor Author

s1monw commented Jan 26, 2017

@elasticmachine test this please

1 similar comment
@s1monw
Copy link
Contributor Author

s1monw commented Jan 27, 2017

@elasticmachine test this please

@s1monw
Copy link
Contributor Author

s1monw commented Jan 27, 2017

@elasticmachine would you mind to f***ing test this at least once?

@s1monw s1monw merged commit 417c93c into elastic:master Jan 27, 2017
@s1monw s1monw deleted the refactor_search_phases branch January 27, 2017 14:53
s1monw added a commit to s1monw/elasticsearch that referenced this pull request Jan 27, 2017
At this point AbstractSearchAsyncAction is just a base-class for the first phase of a search where we have multiple replicas
for each shardID. If one of them is not available we move to the next one. Yet, once we passed that first stage we have to work with
the shards we succeeded on the initial phase.
Unfortunately, subsequent phases are not fully detached from the initial phase since they are all non-static inner classes.
In future changes this will be changed to detach the inner classes to test them in isolation and to simplify their creation.
The AbstractSearchAsyncAction should be final and it should just get a factory for the next phase instead of requiring subclasses
etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>enhancement :Search/Search Search-related issues that do not fall into other categories v5.3.0 v6.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants