Skip to content

Conversation

@EmmanuelDemey
Copy link
Contributor

Change the value of the index field

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS that we support?
  • If you are submitting this code for a class then read our policy for that.

Change the value of the index field
@EmmanuelDemey
Copy link
Contributor Author

I have just signed the CLI

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

Hi @EmmanuelDemey

I think this change is incorrect. In the documentation example, the index created is named idx, so the cluster allocation explain API uses this name for its examples as well.

Can you explain the background behind this change?

@EmmanuelDemey
Copy link
Contributor Author

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

Left a comment about another change needed for this

--------------------------------------------------
PUT /idx?master_timeout=1s&timeout=1s
{"settings": {"index.routing.allocation.include._name": "non_existent_node"} }
Copy link
Member

Choose a reason for hiding this comment

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

Github won't let me comment above this line, but two lines above this there is:

PUT /idx?master_timeout=1s&timeout=1s
{"settings": {"index.routing.allocation.include._name": "non_existent_node"} }

That would need to be changed to use myindex instead of idx also for this PR

@EmmanuelDemey
Copy link
Contributor Author

@dakrone done

@dakrone dakrone added >docs General docs changes v7.0.0 labels Jan 29, 2019
@dakrone
Copy link
Member

dakrone commented Jan 29, 2019

@EmmanuelDemey it seems like you might have signed the CLA with a different e-mail than the one used in yout Git commit. Can you add both of these e-mails into your Github profile (they can be hidden), so we can match your e-mails to your Github profile for the CLA checker?

@dakrone
Copy link
Member

dakrone commented Jan 29, 2019

@elasticmachine ok to test

Copy link
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

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

I left a comment about the cause of the failing tests. I think we can either leave it as-is, or we'll have to delete and then re-create the myindex index with the allocation include settings so that it is in a non-allocated state.

[source,js]
--------------------------------------------------
PUT /idx?master_timeout=1s&timeout=1s
PUT /myindex?master_timeout=1s&timeout=1s
Copy link
Member

Choose a reason for hiding this comment

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

Now I remember why I did not use myindex in the first place. myindex is created previously in this documentation, however, it successfully allocates, which means that the explain API has nothing to explain. I create the idx index with the non_existent_node allocation filtering so that I can guarantee that the index is not successfully allocated for the documentation tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So in fact, the right PR I should do is rename everything from myindex to idx ? 😀

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 for this you can update the settings on the myindex index here instead of trying to recreate it.

@EmmanuelDemey
Copy link
Contributor Author

BTW I have signed the CLA with the right email address

@colings86 colings86 added the :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) label Jan 31, 2019
@jasontedor jasontedor added v8.0.0 and removed v7.0.0 labels Feb 6, 2019
@DaveCTurner
Copy link
Contributor

This PR seems to have stalled. I think it's a good idea, because the change from myindex to idx in the documentation is a little confusing. @EmmanuelDemey do you still intend to work on this?

@EmmanuelDemey
Copy link
Contributor Author

Sorry for the delay.

I think for this you can update the settings on the myindex index here instead of trying to recreate it.

I do not find the corresponding snippet on the documentation anymore.

What modification should I push ?

@DaveCTurner
Copy link
Contributor

I think it's these two lines:

PUT /idx?master_timeout=1s&timeout=1s
{"settings": {"index.routing.allocation.include._name": "non_existent_node"} }

This creates the idx index which cannot be allocated. I think @dakrone was saying that at this point you could update the settings on myindex to cause it to have some unassigned shards instead. I'm not 100% sure how. It's not enough to set "index.routing.allocation.include._name": "non_existent_node" since this won't make it cancel any already-assigned shards. Perhaps delete the myindex index and then recreate it with "index.routing.allocation.include._name": "non_existent_node" in place of the idx index?

@jrodewig
Copy link
Contributor

@elasticmachine update branch



===== Examples of unassigned primary shard explanations

Copy link
Contributor

Choose a reason for hiding this comment

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

This should address the needed changes @DaveCTurner mentioned. This snippet (or something like it) is required to pass the CI tests.

Suggested change
//////
[source,console]
--------------------------------------------------
DELETE /myindex
--------------------------------------------------
//////

Copy link
Contributor

@jrodewig jrodewig left a comment

Choose a reason for hiding this comment

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

@EmmanuelDemey If you're still interested in finishing this PR, I added a suggestion that should get everything working.

As @DaveCTurner mentioned, I believe changing the examples to myindex would be an improvement. Thanks for raising this!

"index": "myindex",
"shard": 0,
"primary": true
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Forgot to add: You'll also need to include a // TEST[continued] comment at the end of this snippet.

@jrodewig
Copy link
Contributor

Closing this PR due to inactivity. Treating as a bug report.

Superseded by #50936

@jrodewig jrodewig closed this Jan 13, 2020
@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) >docs General docs changes stalled v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants