kgeisz commented on code in PR #8115:
URL: https://github.com/apache/hbase/pull/8115#discussion_r3132446368
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -8993,11 +8987,16 @@ IOException throwOnInterrupt(Throwable t) {
public void onConfigurationChange(Configuration newConf) {
this.storeHotnessProtector.update(newConf);
- CoprocessorConfigurationUtil.maybeUpdateCoprocessors(newConf,
this.isGlobalReadOnlyEnabled,
+ boolean originalIsReadOnlyEnabled = CoprocessorConfigurationUtil
+ .areReadOnlyCoprocessorsLoaded(this.conf,
CoprocessorHost.REGION_COPROCESSOR_CONF_KEY);
+
+ CoprocessorConfigurationUtil.maybeUpdateCoprocessors(newConf,
originalIsReadOnlyEnabled,
this.coprocessorHost, CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,
false, this.toString(),
- val -> this.isGlobalReadOnlyEnabled = val, conf -> {
+ conf -> {
decorateRegionConfiguration(conf);
- this.coprocessorHost = new RegionCoprocessorHost(this, rsServices,
newConf);
+ this.coprocessorHost = new RegionCoprocessorHost(this, rsServices,
conf);
+ CoprocessorConfigurationUtil.updateCoprocessorListInConf(this.conf,
conf,
+ CoprocessorHost.REGION_COPROCESSOR_CONF_KEY);
Review Comment:
I added this to satisfy a unit test in
`TestReadOnlyControllerCoprocessorLoading`. The dynamic configuration worked
as expected without this in local deployments or in a docker container setup.
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java:
##########
@@ -3493,10 +3482,16 @@ public void onConfigurationChange(Configuration
newConf) {
LOG.warn("Failed to initialize SuperUsers on reloading of the
configuration");
}
- CoprocessorConfigurationUtil.maybeUpdateCoprocessors(newConf,
this.isGlobalReadOnlyEnabled,
+ boolean originalIsReadOnlyEnabled = CoprocessorConfigurationUtil
+ .areReadOnlyCoprocessorsLoaded(this.conf,
CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY);
+
+ CoprocessorConfigurationUtil.maybeUpdateCoprocessors(newConf,
originalIsReadOnlyEnabled,
this.rsHost, CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY, false,
this.toString(),
- val -> this.isGlobalReadOnlyEnabled = val,
- conf -> this.rsHost = new RegionServerCoprocessorHost(this, newConf));
+ conf -> {
+ this.rsHost = new RegionServerCoprocessorHost(this, conf);
+ CoprocessorConfigurationUtil.updateCoprocessorListInConf(this.conf,
conf,
+ CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY);
Review Comment:
I added this to satisfy a unit test in
`TestReadOnlyControllerCoprocessorLoading`. The dynamic configuration worked
as expected without this in local deployments or in a docker container setup.
--
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]