-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[CCR] Add unfollow API #34132
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
[CCR] Add unfollow API #34132
Conversation
The unfollow API changes a follower index into a regular index, so that it will accept write requests from clients. For the unfollow api to work the index follow needs to be stopped and the index needs to be closed. Closes elastic#33931
|
Pinging @elastic/es-distributed |
| protected AcknowledgedRequest() { | ||
| } | ||
|
|
||
| protected AcknowledgedRequest(StreamInput in) 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.
This change is not really related to the unfollow api, but it allows this: https://github.com/elastic/elasticsearch/pull/34132/files#diff-bd430812001c493a52293cc54e56ea24R36 (immutable fields)
and I think it good that at some point we can not use Streamable anymore. I want to go over other ccr request classes in a follow up change.
|
@martijnvg Can you resolve the conflicts? |
|
@jasontedor Yes, conflicts have been resolved. |
jasontedor
left a comment
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.
It looks good, I left one comment.
| if (persistentTask.getTaskName().equals(ShardFollowTask.NAME)) { | ||
| ShardFollowTask shardFollowTask = (ShardFollowTask) persistentTask.getParams(); | ||
| if (shardFollowTask.getFollowShardId().getIndexName().equals(followerIndex)) { | ||
| throw new IllegalArgumentException("cannot unfollow index [" + followerIndex + |
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 think saying that we can not convert the follower index to a non-follower would be clearer. My concern here is that if bar is following foo and this message says cannot unfollow index [bar] it would be confusing since it is foo that will no longer be being followed by bar.
|
@jasontedor I've updated the PR. |
jasontedor
left a comment
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.
LGTM.
The unfollow API changes a follower index into a regular index, so that it will accept write requests from clients. For the unfollow api to work the index follow needs to be stopped and the index needs to be closed. Closes #33931
The unfollow API changes a follower index into a regular index, so that it will accept write requests from clients. For the unfollow api to work the index follow needs to be stopped and the index needs to be closed. Closes #33931
The unfollow API changes a follower index into a regular index, so that it will accept write requests from clients.
For the unfollow api to work the index following needs to be stopped and the index needs to be closed.
Closes #33931