⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Vladsz83
Copy link
Contributor

No description provided.

@Vladsz83 Vladsz83 changed the title Test : Serialization of DiscoveryMetricsMsg IGNITE-27542 : Use MessageSerializer for TcpDiscoveryMetricsUpdateMessage Jan 16, 2026
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
14 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

import org.apache.ignite.plugin.extensions.communication.Message;

/** Holds map of nodes metrics messages per node id. */
public class TcpDiscoveryNodesMetricsMapMessage implements Message {
Copy link
Contributor

Choose a reason for hiding this comment

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

From usages of this class I can see that it is used solely for metrics from client nodes. I think we should capture this information right in the name of the class to make it easier for a developer to understand its purpose.

What do you think about a name like TcpDiscoveryClientNodesMetricsMessage?

In that case it may make sense to rewrite javadoc as well.

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 thought of it. Not sure. Where we use and what it can do are different. In the scope of this class, metrics of nodes are held. It can be either server metrics or client metrics. Would work with both.

Where it is actually used, the notation and/or javadoc 'client' or 'clients' is present.

assert metrics != null;
assert !this.metrics.containsKey(nodeId);
public void addServerMetrics(UUID srvrId, ClusterMetrics newMetrics) {
assert srvrId != null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to protect something in metric message with asserts? I believe that metrics are not that important, and even if some parameters are null, we could skip any actions with metrics without big harm to functionality of the cluster.

At the same time triggered assertion could cause a node or ever a cluster to shut down.

I don't think we should tie stability of the cluster to possible issues with metrics gathering. Importance of metrics is lower than an overall stability of the cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still can drop a node by the metrics. At least a client. Look for 'Failing client node due to not receiving metrics updates '. It traverses a map. If key not found, node is considered as failed. Unfortunatelly. I would not touch this logic and what related to it. Instead, we might move these metrics into Communication. And/or remove them at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants