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

Return missing (404) if a scroll_id is cleared that no longer exists. #5865

Conversation

martijnvg
Copy link
Member

PR for #5730

@martijnvg martijnvg changed the title Return missing (404) is a scroll_id is cleared that no longer exists. Return missing (404) if a scroll_id is cleared that no longer exists. Apr 23, 2014
this.succeeded = succeeded;
this.noneFreed = noneFreed;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the name too much maybe we can just count the number of freed contexts and return that responding with 404 if it's == 0? then we can call it numFreed?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure make sense, I'll update the PR

@martijnvg
Copy link
Member Author

@s1monw I updated the PR to replace noneFreed to numFreed, so now it just counts the number of freed search contexts.

@martijnvg
Copy link
Member Author

Updated PR to latest master.

* @return The number of seach contexts that were freed. If this is <code>0</code> the assumption can be made,
* that the scroll id specified in the request did not exist. (never existed, was expired, or completely consumed)
*/
public int isNumFreed() {
Copy link
Contributor

Choose a reason for hiding this comment

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

more likely getNumFreed() as it is not a boolean?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change that :) (used to be a boolean property: freed)

@spinscale
Copy link
Contributor

left two comments. One last thing though that bothers me: In SearchServiceTransportAction you changed the types and thus the listener method definitions. This is not supposed to work in rolling upgrades, or does it?

@martijnvg
Copy link
Member Author

Thanks for reviewing it!

The change of the type in SearchFreeContextResponse should work, because of the versioning in SearchFreeContextResponse class makes sure that same bytes are send over the wire if node version < 1.2.0

Let ClearScrollResponse implement StatusToXContent
@martijnvg
Copy link
Member Author

@spinscale I updated the PR and addressed the two comments.

@spinscale
Copy link
Contributor

LGTM

@martijnvg
Copy link
Member Author

Pushed to master and 1.x branches.

@martijnvg martijnvg closed this May 12, 2014
martijnvg added a commit that referenced this pull request May 13, 2014
martijnvg added a commit that referenced this pull request May 13, 2014
@s1monw s1monw removed the review label Jun 18, 2014
@martijnvg martijnvg deleted the improvements/clear_scroll_support_missing branch May 18, 2015 23:31
@clintongormley clintongormley added the :Search/Search Search-related issues that do not fall into other categories label Jun 7, 2015
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 v1.2.0 v2.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants