taklwu commented on code in PR #8280:
URL: https://github.com/apache/hbase/pull/8280#discussion_r3314789100
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/util/CoprocessorConfigurationUtil.java:
##########
@@ -264,28 +246,43 @@ public static String getComponentName(String
coprocessorConfKey) {
* @param reloadTask lambda function that reloads
coprocessors on the master,
* region server, or region
*/
- public static void maybeUpdateCoprocessors(Configuration newConf,
+ public static void maybeUpdateCoprocessors(Configuration newConf,
Configuration confToUpdate,
boolean originalIsReadOnlyEnabled, CoprocessorHost<?, ?> coprocessorHost,
String coprocessorConfKey, boolean isMaintenanceMode, String instance,
CoprocessorReloadTask reloadTask) {
- boolean maybeUpdatedReadOnlyMode =
ConfigurationUtil.isReadOnlyModeEnabledInConf(newConf);
- boolean hasReadOnlyModeChanged = originalIsReadOnlyEnabled !=
maybeUpdatedReadOnlyMode;
+ String componentName = getComponentName(coprocessorConfKey);
+ boolean currentReadOnlyMode =
ConfigurationUtil.isReadOnlyModeEnabledInConf(newConf);
+ boolean hasReadOnlyModeChanged = originalIsReadOnlyEnabled !=
currentReadOnlyMode;
boolean hasCoprocessorConfigChanged = CoprocessorConfigurationUtil
.checkConfigurationChange(coprocessorHost, newConf, coprocessorConfKey);
- // update region server coprocessor if the configuration has changed.
if ((hasCoprocessorConfigChanged || hasReadOnlyModeChanged) &&
!isMaintenanceMode) {
LOG.info("Updating coprocessors for {} {} because the configuration has
changed",
- getComponentName(coprocessorConfKey), instance);
- CoprocessorConfigurationUtil.syncReadOnlyConfigurations(newConf,
coprocessorConfKey);
- reloadTask.reload(newConf);
+ componentName, instance);
+ if (hasReadOnlyModeChanged) {
Review Comment:
this reminded me about #7514 were facing the same issue, IMO you're doing
the right change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]