-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Deprecate the no-jdk distributions #64275
Conversation
This commit adds logging to indicate that the no-jdk distributions are deprecated and will be removed in a future release.
Pinging @elastic/es-core-infra (:Core/Infra/Packaging) |
@@ -255,7 +256,8 @@ | |||
* Logger initialized in the ctor because if it were initialized statically | |||
* then it wouldn't get the node name. | |||
*/ | |||
private final Logger logger; | |||
private final Logger logger = LogManager.getLogger(Node.class); |
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.
Doesn't this conflict with the comment just above?
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.
Good catch, I think the comment is unclear since it refers to static initialization, which is not what is happening here, this is merely instance field initialization, a normal part of instance construction. That is, I read the comment thinking it was explaining why the field is not a static field, as is often the case with loggers. I also think this comment should be located where the initialization needs to take place, rather than on the field itself since that's where someone is going to see the initialization and wonder why?
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.
Actually, I still think the change is correct and it's the comment that is unclear and confusing. I think the key is in fact that it be an instance field and not static. There is absolutely no practical difference between this field being initialized separately, and as the first line of the constructor.
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'm leaving the change as-is and will clean up the comment.
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.
In fact, we could make this logger instance a static instance if we moved the node.name setting out of the Node class and into its own class. The current problem is that touching this setting initializes the class. If the logger were static, then it would initialize the logger too, prematurely. If the setting were moved out of this class, we could touch the setting without initializing the logger here. That should be a follow-up.
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 pushed 1053cfb.
This commit adds logging to indicate that the no-jdk distributions are deprecated and will be removed in a future release.
This commit adds logging to indicate that the no-jdk distributions are deprecated and will be removed in a future release.
Thanks for reviewing @pugnascotia. |
This commit adds logging to indicate that the no-jdk distributions are deprecated and will be removed in a future release.