-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Better warning message on cluster sharding registration #24906
Better warning message on cluster sharding registration #24906
Conversation
Test PASSed. |
coordinatorSelection, shardBuffers.totalSize) | ||
actorSelection, shardBuffers.totalSize) | ||
case None ⇒ log.warning( | ||
"No coordinator found to register. Probably, no seed-nodes configured and manual cluster join not performed? Total [{}] buffered messages.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also happen when members are joining but not yet Up
- perhaps we could find a simple way to word this that makes that more obvious?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Below cases are possible for coordinatorSelection
being None
?
- seed-node not configured and manual configuration is not performed
- members are joining but not yet
Up
- general network problem
I think the original issue #24295 intended to make 1. more obvious, and distinguished from the case where coordinatorSelection
is Some()
. However, I'm not sure how to put these 1 ~ 3 cases into a single warning message with reasonable length... so, what I think could do are:
- put a lengthy message saying 1, 2, and 3 are possible
- or, link to a certain section of the doc explaining 1, 2 and 3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this distinction between None and Some makes it much more clear what the reason might be. Not Up yet should be rare, since coordinator is on the oldest.
One additional hint to the log message of the Some case could be to include something if it's unreachable:
val coordinatorIsUnreachable = cluster.state.unreachable(membersByAge.head)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggesting one addition
coordinatorSelection, shardBuffers.totalSize) | ||
actorSelection, shardBuffers.totalSize) | ||
case None ⇒ log.warning( | ||
"No coordinator found to register. Probably, no seed-nodes configured and manual cluster join not performed? Total [{}] buffered messages.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this distinction between None and Some makes it much more clear what the reason might be. Not Up yet should be rare, since coordinator is on the oldest.
One additional hint to the log message of the Some case could be to include something if it's unreachable:
val coordinatorIsUnreachable = cluster.state.unreachable(membersByAge.head)
Test PASSed. |
d45cc70
to
077ed2f
Compare
Added a new commit to this - @patriknw does this look ok? |
Test FAILed. |
argh, will look into the test failure |
Test PASSed. |
Test passed, and ready for review now. The earlier test failure was due to a wrong character I accidentally inserted in a comment, which I removed by git commit --amend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
* Provide access to known shard types akka/akka#23912 * Separate sharding regions and proxies akka/akka#23472 Fix lookup of coordinator for sharding proxies akka/akka#23995 * Fix race in ClusterShardingFailureSpec AFAICT there was nothing ensuring the order of messages when sent to the shard and the region so first checkthat the passivation has happened before sending another add in the test akka/akka#24013 * Better warning message on cluster sharding registration akka/akka#24906 * entityId => Behavior in ClusterSharding API mixture of akka/akka#24053 akka/akka#21809 akka/akka#24470 * sharding tests updated * headers fixed, docs updated * ClusterSharding: automatically choose start or startProxy by a node role akka/akka#23934
Closes #24295