Skip to content

Conversation

@kingherc
Copy link
Contributor

@kingherc kingherc commented Sep 5, 2022

In CommonStats so that they are visible in NodeIndicesStats only at the node and index (but not shard) levels. Also visible in the _cat/nodes table.

Relates to issue #86639

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2022

Documentation preview:

@kingherc kingherc force-pushed the feature/86639-new-sizing-stats branch 4 times, most recently from d4ba2f3 to 8375f37 Compare September 5, 2022 17:17
@DaveCTurner
Copy link
Contributor

Fixes #86639 partly

Github doesn't understand the partly bit and will close #86639 when this PR is merged. Best to just say Relates instead of Fixes

@kingherc kingherc force-pushed the feature/86639-new-sizing-stats branch from b909f1e to f4cf6c9 Compare September 6, 2022 09:47
@kingherc kingherc marked this pull request as ready for review September 6, 2022 18:08
@kingherc kingherc added :Data Management/Stats Statistics tracking and retrieval APIs :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. labels Sep 6, 2022
@elasticsearchmachine elasticsearchmachine added Team:Data Management Meta label for data/management team Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. labels Sep 6, 2022
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed (Team:Distributed)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @kingherc, I've created a changelog YAML for you.

@kingherc kingherc changed the title Introduce FieldMapperStats in CommonStats Introduce FieldMappingStats in CommonStats Sep 6, 2022
@kingherc kingherc removed the request for review from original-brownbear September 7, 2022 09:21
@kingherc kingherc marked this pull request as draft September 7, 2022 09:21
@kingherc
Copy link
Contributor Author

kingherc commented Sep 7, 2022

@original-brownbear I'm removing you from reviewers for now, and converting this back to draft, since we want more stuff on the sub-PR #89798. Once that is done, I'll rebase this and re-invite you to review.

@kingherc kingherc force-pushed the feature/86639-new-sizing-stats branch from 77cdd79 to c60288e Compare September 7, 2022 11:13
@kingherc kingherc changed the title Introduce FieldMappingStats in CommonStats Introduce node field mapping stats Sep 7, 2022
@kingherc kingherc force-pushed the feature/86639-new-sizing-stats branch from c60288e to c133985 Compare September 8, 2022 16:33
@kingherc kingherc changed the title Introduce node field mapping stats Introduce node mappings stats Sep 8, 2022
So that they are visible in NodeIndicesStats only at
the node and index (but not shard) levels.
Also visible in the _cat/nodes table.

Relates to issue elastic#86639
And make an exact count yaml REST test
And FieldMapperStats to NodeMappingStats
@kingherc kingherc force-pushed the feature/86639-new-sizing-stats branch from c133985 to 2821d2c Compare September 8, 2022 16:39
@kingherc kingherc marked this pull request as ready for review September 8, 2022 17:40
@kingherc
Copy link
Contributor Author

kingherc commented Sep 8, 2022

Hi @original-brownbear , I rebased on master and did some fixes. Feel free to review now, thanks!

And use in checkFieldLimit
@kingherc kingherc requested a review from javanna September 9, 2022 12:35
Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

I mainly just looked at the docs changes and left some suggestions.

Comment on lines +229 to +231
per index held by each data node. In a running cluster, you can also consult the
<<cluster-nodes-stats,Nodes stats API>>'s `mappings` indices statistic, which
reports the number of field mappings and an estimation of their heap overhead.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should consider rephrasing this whole section in terms of these stats now that they're available. We can however do that in a followup - it's the third item on the list for #86639.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, feel free to gather ideas already here if you'd like. cc @original-brownbear

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with a follow-up, linking from here is fine by me for now.

@kingherc
Copy link
Contributor Author

kingherc commented Sep 9, 2022

I mainly just looked at the docs changes and left some suggestions.

Yes feel free to also look at the other changes as well if you'd like, otherwise I consider @original-brownbear as the main reviewer.

@kingherc
Copy link
Contributor Author

Ping @original-brownbear for a review, in case we can make this before FF of 8.5.0.

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

A few initial points, I'll give it another pass a little later. Looks good overall though thanks!

Comment on lines +229 to +231
per index held by each data node. In a running cluster, you can also consult the
<<cluster-nodes-stats,Nodes stats API>>'s `mappings` indices statistic, which
reports the number of field mappings and an estimation of their heap overhead.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with a follow-up, linking from here is fine by me for now.

@kingherc kingherc self-assigned this Sep 15, 2022
Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @kingherc I added a few more questions about the code.

@kingherc
Copy link
Contributor Author

Hi @original-brownbear , I fixed the last comments, feel free to give it another review! thanks!

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

Thanks Iraklis, this looks good now. Just one spot that I found where we could massively simplify this for now when reading over it again and some small stuff.

@kingherc
Copy link
Contributor Author

@original-brownbear , fixed your comments. Feel free to check the last commit, thanks!

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM, just some minor NITs that don't require another round of reviewing.

if (stats.getNodeMappings() != null) {
if (nodeMappings == null) {
nodeMappings = new NodeMappingStats();
nodeMappings.add(stats.getNodeMappings());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just do what we do for shard stats above and go with:

if (nodeMappings == null) {
    nodeMappings = stats.getNodeMappings();
} else {
   nodeMappings.add(stats.getNodeMappings());
}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe shard stats is doing it very differently than the code above it, which actually creates a new object rather than assigning the reference of the added object (like what shard stats code is doing). So I decided to follow the above code, which seems better/safer to me. Feel free to tell me if you disagree and I can make it like shard stats

Copy link
Contributor

Choose a reason for hiding this comment

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

Hah yea we have both versions. It doesn't really matter I guess, fine by me to go with the safe version here.

@kingherc kingherc merged commit 3ed7a04 into elastic:main Sep 19, 2022
@kingherc kingherc deleted the feature/86639-new-sizing-stats branch September 19, 2022 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Stats Statistics tracking and retrieval APIs :Distributed Coordination/Cluster Coordination Cluster formation and cluster state publication, including cluster membership and fault detection. >enhancement Team:Data Management Meta label for data/management team Team:Distributed (Obsolete) Meta label for distributed team (obsolete). Replaced by Distributed Indexing/Coordination. v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants