-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[AMQ-7514] Deprecate configuration that uses non-inclusive language #679
Conversation
@@ -152,10 +152,15 @@ | |||
private boolean useShutdownHook = true; | |||
private boolean useLoggingForShutdownErrors; | |||
private boolean shutdownOnMasterFailure; | |||
private boolean shutdownOnActiveFailure; |
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.
Its a private field no need to duplicate just rename the original field. Just need to keep method compatibility
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 comment applies generally. No need for me to repeat on every occurance
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.
Hmm good point, my brain didn't catch that as my first pass was assuming spring looked at the actual variable names.
edit: xbean
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 was addressed in latest version of PR
if (shutdownOnMasterFailure) { | ||
LOG.error("The Master has failed ... shutting down"); | ||
if (shutdownOnActiveFailure) { | ||
LOG.error("The Active has failed ... shutting down"); |
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.
Active doesnt sound like a good replacement for master
Typically we would refer to master or slave and which one is serving being the current active node.
Active and passive = state
Master / slave was what role the node took.
I think a different word to replace master should be found e.g.(primary/standby) (primary/replica)
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.
The ticket mentions active/standby and I'd tend to agree that it's the clearest (it's also what we use at AWS).
Consider:
- of the nodes, only 1 is active serving requests
- the other nodes are not pure replicas, as they have shared storage, rather they are on standby over the same FS
It's possible that in the previous replicated leveldb one could think of replica as a good term here, but I think it's slightly disingenuous. (especially if the storage used isn't actually replicated...)
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 disagree with the ticket then
Active is state though. Either master or slave can be active. E.g. we talk about a slave being passive and then if master fails it becomes active. We will end up with very confusing terminology.
https://www.theserverside.com/opinion/Master-slave-terminology-alternatives-you-can-use-right-now
Also i would appreciate the discussion is not based on because aws does it. This is an apache project not an aws one.
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.
Quickly reading the ticket actually mentions
New terms:
a. For shared storage: ‘active’ and ’standby’
b. For replication: ‘primary’ and ‘replica'
c. For 'white list' and 'blacklist': 'allow list' and 'deny list'
Like wise earlier in the same ticket it mentions
Here are just a few terms that should be changed: * The following terms are being targeted for change:
'master' and 'slave' should be replaced with the terms 'live' and 'backup''whitelist' and 'blacklist' should be replaced with the terms 'allowlist' and 'denylist'Rename all the git 'master' branches to the term 'main'
A little using terminology within context and avoiding conflicting terminology is needed here.
I agree i think also we historically overloaded the use of master slave too. Especially when leveldb (i think the wording used then was "pure master slave") and replicated kahadb was done. So some legacy nomiculture there with what master slave meant along with active and passive.
So in this case its the replication one, e.g. the broker is either the primary instance or the replica instance .. so primary replica (or primary standby) should maybe be used
Im also keen we align with Artemis broker for consistency sakes on the way forward here.
Happy for others to chip in here. As this is one of those things that once released its a done deal...
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 agree with @michaelandrepearce. I've added a comment to AMQ-7514 to push along the discussion.
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 group of methods is never read anywhere by the code base. My understanding is that they are legacy hold-over from early replication approach that has been removed long ago. I do not see any reason to deprecate them. Given that we have agreed to make major breaking changes in 5.17.x (remove leveldb), I believe we can safely remove these methods in this pass.
We should not be adding new terms or concepts that do not apply to the code base in this pass.
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 did a 'find references' search and yeah, you're right @mattrpav. I think this is also relevant in the discussion about active/passive/standby. It seems reasonable in the scope of this change rather than renaming to actually remove those methods/concepts. Then there is no need to consider the 'existing' terminology.
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.
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.
Comments inline
/** | ||
* @deprecated AMQ-7514 in the move to inclusive nomenclature | ||
*/ | ||
@Deprecated |
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 method is never called in the code base. My understanding is that it was kept to not break configurations from the long-gone active-active replication. I would contend that since we have agreed to remove leveldb from 5.17.x and there are no planned usages for these metods, that this method (and related ones) could safely be removed instead of deprecated.
try { | ||
stop(); | ||
} catch (Exception e) { | ||
LOG.error("Failed to stop for master failure", e); | ||
LOG.error("Failed to stop for active failure", e); |
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.
Updating log messages is tricky, since it can break monitoring in not-so-easy-to-upgrade ways. I think this should be a sub-task conversation on the parent ticket.
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.
How about in the scope of this PR we add both messages, and then the subtask is to remove the non-inclusive messages? That would support a transition period well.
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.
2 messages could yield 2 alerts. I think we break this up into some sub-tasks and add a broker config param to flip b/w the log messages using deprecated terms. I'll update the JIRA with some sub-tasks.
if (shutdownOnMasterFailure) { | ||
LOG.error("The Master has failed ... shutting down"); | ||
if (shutdownOnActiveFailure) { | ||
LOG.error("The Active has failed ... shutting down"); |
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 group of methods is never read anywhere by the code base. My understanding is that they are legacy hold-over from early replication approach that has been removed long ago. I do not see any reason to deprecate them. Given that we have agreed to make major breaking changes in 5.17.x (remove leveldb), I believe we can safely remove these methods in this pass.
We should not be adding new terms or concepts that do not apply to the code base in this pass.
activemq-broker/src/main/java/org/apache/activemq/broker/BrokerService.java
Outdated
Show resolved
Hide resolved
This removes passiveSlave and waitForSlave and waitForSlaveTimeout which are no longer used
This is the first in a series of changes that will phase out non inclusive terminology throughout the config, and codebase.
a3925c9
to
e34ae17
Compare
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.
The base commit #700 and this PR can both be merged without any merge conflicts, pending approval of course.
@@ -152,10 +152,15 @@ | |||
private boolean useShutdownHook = true; | |||
private boolean useLoggingForShutdownErrors; | |||
private boolean shutdownOnMasterFailure; | |||
private boolean shutdownOnActiveFailure; |
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 was addressed in latest version of PR
Auto closed |
This is the first in a series of changes that are planned to phase out non-inclusive terminology throughout the config, and codebase.