Skip to content

[CCR] Update es monitoring mapping and #33635

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 3 commits into from
Sep 12, 2018

Conversation

martijnvg
Copy link
Member

change qa tests to query based on leader index.

change qa tests to query based on leader index.
@martijnvg martijnvg added review :Distributed Indexing/CCR Issues around the Cross Cluster State Replication features labels Sep 12, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

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.

I left one comment.

As we continue to iterate on the stats endpoint (we will) we will need to consider a way to enforce that we keep the mapping up to date with the changes?

"type": "keyword"
},
"shard_id": {
"type": "keyword"
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about this being a keyword, I think probably a numeric field type is preferred here?

Copy link
Member Author

@martijnvg martijnvg Sep 12, 2018

Choose a reason for hiding this comment

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

Good point. It is serialized as a string now ([index-name][shard-id]). I think that is not super useful and serializing just the shard id is better? (the leader index is already stored in another field)

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 I am missing something, it should only be being serialized as the numerical shard ID, without the index name. See this test:

and the x-content logic:

Copy link
Member Author

Choose a reason for hiding this comment

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

whoops. I read shardId as field name and I assumed ShardId class.

* master:
  Fix checkstyle violation in ShardFollowNodeTask
  [HLRC][ML] Add ML put datafeed API to HLRC (elastic#33603)
@martijnvg
Copy link
Member Author

As we continue to iterate on the stats endpoint (we will) we will need to consider a way to enforce that we keep the mapping up to date with the changes?

Agreed. I'm not sure how though. Add unit test in monitoring that iterates over all static parse fields, parse the mapping and then verify if there is a entry in the mapping?

@ycombinator
Copy link
Contributor

Maybe its too heavy handed but Monitoring has integration tests. Maybe one of those to collect stats and then query for them, to ensure that all the fields were indeed indexed as expected?

@martijnvg
Copy link
Member Author

@ycombinator Thanks, I did not know that. I think we can add a test here or somewhere else that uses CcrStatsCollector directly, get a monitoring doc based on a dummy ccr stat response, index that monitor doc via an Exporter and then expect that we can search on all field that are in ShardFollowNodeTaskStatus.

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 901d803 into elastic:master Sep 12, 2018
martijnvg added a commit that referenced this pull request Sep 12, 2018
* [CCR] Update es monitoring mapping and
change qa tests to query based on leader index.


Co-authored-by: Jason Tedor <jason@tedor.me>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants