Skip to content

Conversation

@martijnvg
Copy link
Member

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

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
@martijnvg martijnvg added review :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Sep 28, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

protected AcknowledgedRequest() {
}

protected AcknowledgedRequest(StreamInput in) throws IOException {
Copy link
Member Author

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.

@jasontedor
Copy link
Member

@martijnvg Can you resolve the conflicts?

@martijnvg
Copy link
Member Author

@jasontedor Yes, conflicts have been resolved.

Copy link
Member

@jasontedor jasontedor left a 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 +
Copy link
Member

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.

@martijnvg
Copy link
Member Author

@jasontedor I've updated the PR.

Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

LGTM.

@martijnvg martijnvg merged commit b1a27b2 into elastic:master Sep 30, 2018
martijnvg added a commit that referenced this pull request Sep 30, 2018
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
kcm pushed a commit that referenced this pull request Oct 30, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Indexing/CCR Issues around the Cross Cluster State Replication features >non-issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CCR] Change APIs to align better with how CCR will be used

3 participants