Skip to content

[HLRC] Added support for CCR Resume Follow API #35638

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 4 commits into from
Nov 21, 2018

Conversation

martijnvg
Copy link
Member

This change also adds documentation for the Resume Follow API

Relates to #33824

This change also adds documentation for the Resume Follow API

Relates to elastic#33824
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

import java.io.IOException;
import java.util.Objects;

public class FollowConfig {
Copy link
Member Author

Choose a reason for hiding this comment

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

Added this to avoid repeating all of this in the ResumeFollowRequest class. Also the put auto follow pattern can make use of this.

Copy link
Contributor

@hub-cap hub-cap left a comment

Choose a reason for hiding this comment

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

just a small nit that we can discuss, or you can shut me down on :P

this.readPollTimeout = readPollTimeout;
}

void toXContentFragment(XContentBuilder builder, ToXContent.Params params) throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to make this class extend ToXContentFragment? Ive not used it a lot but I know it exists so I wonder if this is a candidate for it? I guess maybe not if you are just extending it below as a non fragment object instead of new'ing it. Was there reason you didnt just new this in the Requests instead of extending?

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 guess maybe not if you are just extending it below as a non fragment object instead of new'ing it.

If it was used on its own then i would have done that. But that is not the case now.


@Override
protected boolean supportsUnknownFields() {
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

how come this is set to false? Id prefer if we allowed unknowns since the server side API can change and we want to be as compat as possible w/ server on multiple versions

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 did this because the server side parser also doesn't allow unknown fields, but I guess it doesn't really matter as it is a parser only used in this unit test.

@martijnvg martijnvg merged commit 9b2ab06 into elastic:master Nov 21, 2018
martijnvg added a commit that referenced this pull request Nov 21, 2018
This change also adds documentation for the Resume Follow API

Relates to #33824
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants