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

Fix LowestAddressJoinDecider cluster formation warning log to not depend on INFO logging level being set #647

Merged
merged 1 commit into from
May 26, 2020

Conversation

ptrdom
Copy link
Contributor

@ptrdom ptrdom commented Mar 27, 2020

Issue is quite self explanatory - I can't see a good reason to have an important warning log to be disabled by not setting logging level to INFO.

References #645

@ptrdom ptrdom force-pushed the lowest-address-join-decider-logging-fix branch from 94c5a48 to b86f78c Compare March 28, 2020 01:47
octonato
octonato previously approved these changes Mar 30, 2020
Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

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

Makes sense. Thanks for that @dope9967

@octonato octonato dismissed their stale review March 30, 2020 07:23

I'm removing my review. I have missed something, see comments.

@ptrdom ptrdom force-pushed the lowest-address-join-decider-logging-fix branch from eb2c326 to c48cdb8 Compare March 30, 2020 07:35
Copy link
Member

@octonato octonato left a comment

Choose a reason for hiding this comment

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

@dope9967, this is in the right direction. I left a minor change request.

I think the right conditional will be:

if (settings.newClusterEnabled) {
 if (log.isInfoEnabled) {
   // do info logging
 }
} else {
 // do warn logging
}

@ptrdom ptrdom requested a review from octonato March 30, 2020 07:37
@@ -74,7 +74,8 @@ class LowestAddressJoinDecider(system: ActorSystem, settings: ClusterBootstrapSe
lowestAddress.map(contactPointString).getOrElse(""),
info.contactPoints.map(contactPointString).mkString(", ")
)
else
} else {
if (log.isWarningEnabled)
Copy link
Member

Choose a reason for hiding this comment

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

Strictly speaking, checking if warning logging is enabled is not that useful. Warn logging is often enable so the chances of optimisation are minimal here. That's much different that info and debug. Those are the levels that are in practice tweaked by users.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense.

Copy link
Member

@octonato octonato Mar 30, 2020

Choose a reason for hiding this comment

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

Anyway, not a big issue and I think it's ok to leave like that. That was just a side comment.

Copy link
Member

@chbatey chbatey left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@chbatey
Copy link
Member

chbatey commented May 18, 2020

The build failure is because we test against the latest version of k8s with minikube and the install for that no longer works. I'll fix that under a separate issue.

@chbatey
Copy link
Member

chbatey commented May 26, 2020

The failure is unrelated and fixed on master

@chbatey chbatey merged commit 91245a9 into akka:master May 26, 2020
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.

None yet

3 participants