HBASE-29965: Unable to dynamically change readonly flag#7964
Open
kgeisz wants to merge 2 commits intoapache:HBASE-29081_rebasedfrom
Open
HBASE-29965: Unable to dynamically change readonly flag#7964kgeisz wants to merge 2 commits intoapache:HBASE-29081_rebasedfrom
kgeisz wants to merge 2 commits intoapache:HBASE-29081_rebasedfrom
Conversation
Change-Id: I5b5479e37921ea233f586f0f02d2606320e16139
Change-Id: Ie9ba9c771b12793516a6227888caf9c734e05c86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://issues.apache.org/jira/browse/HBASE-29965
Summary
This pull request fixes an issue where dynamic configuration for
hbase.global.readonly.enabledwas not working. If the user changed the boolean value forhbase.global.readonly.enabledin hbase-site.xml, saved the file, and then ranupdate_all_config, then the new config value was not being set in HBase. This was happening because theConfigurationManager.notifyAllObservers()method was not getting the updated value forhbase.global.readonly.enabled. I was able to fix this by making sureCoprocessorConfigurationUtil.syncReadOnlyConfigurations()was not directly setting the conf value.Key Changes
HMaster,HRegionServer, andHRegion.update_all_configtriggers theonConfigurationChange()method for eachConfigurationObserver.onConfigurationChange()method forHMaster,HRegionServer, andHRegion.CoprocessorConfigurationUtil.syncReadOnlyConfigurations()to have it only handle updating coprocessor lists. It no longer handles updatinghbase.global.readonly.enabledin the configuration.syncReadOnlyConfigurations()is run in theonConfigurationChange()methods. It is now run when the global read-only status has changed or when there has been a change in the coprocessor configuration.syncReadOnlyConfigurations()method signature.syncReadOnlyConfigurations()is now either used when initializing a master, region server, or region, or when a configuration change has occurred. This means the method is always using the "most up-to-date" version of the configuration, so it can get the read-only mode from the configuration itself.