remove extra node in prop path#3003
Conversation
ctubbsii
left a comment
There was a problem hiding this comment.
I do think it would be nice if system scope used the same node name (config or conf, consistently). We could also fix that here before the release.
|
This would fix #2690 |
|
Changing the node name so that they match would require additional changes that would include removing the legacy node. It was easier now to keep the existing convention. I would suggest a follow-on PR. It is mainly going to be changes in the ConfigurationTransform code. A higher priority right now should be working to trace down the concurrency issues with multiple property updates - once those are resolved, this could be revisited. |
Tests pass with the latest in PR #2967, See my comment here: #2967 (comment) |
|
This change doesn't make sense to me to merge in now as it seems too late to be making a change like this with the 2.1.0 release being imminent. I would think it would be better to wait until the next version for this change and at the same time we can also rename system scope to be consistent with the others. |
|
Also if the reason to do it now would be that changing it later requires doing some upgrading/migration to the property store then that could just be part of the migration that needs to be done anyways if we rename the system level node from config to conf. |
|
What's the status of this PR now? Is there anything else to do here or is it ready? |
|
I have an update forthcoming that uses the same node name (config) instead of config for system and conf for namespace and tables - going through the final clean-up now. Because of merges, the push will likely be a force push. |
d2a2a7e to
1840593
Compare
|
This now contains the changes needed to use config instead of conf as the configuration node name for tables and namespaces (system already used config) |
cshannon
left a comment
There was a problem hiding this comment.
I think this mostly looks good but I think a couple things could be changed which I left comments for.
I also think some of the testing should be improved a bit specifically for ConfigTransformer and ConfigProperyUpgrader. Since this is upgrading properties I think it should be well tested as it wouldn't be great if the upgrade logic failed and broke an existing install when a user upgraded.
ConfigProperyUpgraderTestwas created but just uses a mockConfigTransformer. It also doesn't test much other than the normal path. There's some edge cases that could be tested I think to make sure it handles errors. For example test what happens if the legacy path is bad, etc.
2.ForConfigTransformer, there are a couple integration tests (onlyConfigTransformerIT) but not many. I think it might be useful to create a test specifically forConfigTransformer(just like you did forConfigPropertyUpgrader) to test the new behavior (using mocks, etc) and run through the different edge cases and scenarios to verify it works.
3.Lastly, I think bothConfigPropertyUpgraderITandConfigTransformerITcould use some extra tests to exercise the new behavior in more scenarios.
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
Outdated
Show resolved
Hide resolved
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStoreKey.java
Outdated
Show resolved
Hide resolved
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropLoader.java
Outdated
Show resolved
Hide resolved
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java
Outdated
Show resolved
Hide resolved
server/base/src/main/java/org/apache/accumulo/server/conf/util/ConfigTransformer.java
Outdated
Show resolved
Hide resolved
server/base/src/main/java/org/apache/accumulo/server/conf/store/impl/ZooPropStore.java
Outdated
Show resolved
Hide resolved
|
LGTM now |
The original rework of the prop store was using a separate ZooKeeper node under the "original" configuration node. In ZooKeeper the structure looked like:
This removed that extra node an stores the configuration directly in the configuration node. The structure now looks like: