-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[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
[HLRC] Added support for CCR Resume Follow API #35638
Conversation
This change also adds documentation for the Resume Follow API Relates to elastic#33824
Pinging @elastic/es-core-infra |
import java.io.IOException; | ||
import java.util.Objects; | ||
|
||
public class FollowConfig { |
There was a problem hiding this comment.
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.
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 #33824