Skip to content
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

Log send time and sqNbr in verbose cluster heartbeat messages #6496. #6548

Merged
merged 1 commit into from Mar 23, 2023

Conversation

F0b0s
Copy link
Contributor

@F0b0s F0b0s commented Mar 23, 2023

Fixes #6496

Changes

Log send time and sqNbr in verbose cluster heartbeat messages

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

@@ -248,7 +247,8 @@ private void CheckTickInterval()
"Previous heartbeat was sent [{1}] ms ago, expected interval is [{2}] ms. This may cause failure detection " +
"to mark members as unreachable. The reason can be thread starvation, e.g. by running blocking tasks on the " +
"default dispatcher, CPU overload, or GC.",
_cluster.SelfAddress, (now - _tickTimestamp).TotalMilliseconds, _cluster.Settings.HeartbeatInterval.TotalMilliseconds);
_cluster.SelfAddress, (now - _tickTimestamp).TotalMilliseconds.ToString(CultureInfo.InvariantCulture),
Copy link
Contributor Author

@F0b0s F0b0s Mar 23, 2023

Choose a reason for hiding this comment

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

Usage of CultureInfo.InvariantCulture here may be breaking changes, because without ToString logger calls object.ToString() which should use current culture.
Not sure do we need to use InvariantCulture here.

Copy link
Member

Choose a reason for hiding this comment

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

InvariantCulture is the right call - won't be a breaking change for anyone (we don't consider updates to the content of log messages to be breaking changes.)

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

One minor usability nitpick

@@ -248,7 +247,8 @@ private void CheckTickInterval()
"Previous heartbeat was sent [{1}] ms ago, expected interval is [{2}] ms. This may cause failure detection " +
"to mark members as unreachable. The reason can be thread starvation, e.g. by running blocking tasks on the " +
"default dispatcher, CPU overload, or GC.",
_cluster.SelfAddress, (now - _tickTimestamp).TotalMilliseconds, _cluster.Settings.HeartbeatInterval.TotalMilliseconds);
_cluster.SelfAddress, (now - _tickTimestamp).TotalMilliseconds.ToString(CultureInfo.InvariantCulture),
Copy link
Member

Choose a reason for hiding this comment

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

InvariantCulture is the right call - won't be a breaking change for anyone (we don't consider updates to the content of log messages to be breaking changes.)

src/core/Akka.Cluster/ClusterHeartbeat.cs Show resolved Hide resolved
src/core/Akka.Cluster/ClusterHeartbeat.cs Show resolved Hide resolved
@Aaronontheweb Aaronontheweb merged commit b07771a into akkadotnet:dev Mar 23, 2023
12 checks passed
@F0b0s F0b0s deleted the cluster_heartbeat_fix branch March 23, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka.Cluster: need to log send time in verbose heartbeat messages
2 participants