-
Notifications
You must be signed in to change notification settings - Fork 520
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
HDDS-10336. Allow setting client side ozone.replication configs to EC. #7750
base: master
Are you sure you want to change the base?
Conversation
… config is EC. Fixed the order of resolution of replcation configs for buckets and keys.
Thanks @SaketaChalamchala for the patch. I think items (2) and (3) are by design, to be backward compatible with old behavior, before bucket-level replication setting existed. |
Ok, so would it be better to limit the scope of this PR to (1) and maybe create a DOC jira to specify what order of resolution to to expect when |
Yes, (1) can be fixed without controversy.
Yes, I think doc needs some clarification.
I don't know. It was "undocumented" (removed from |
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.
Thanks @SaketaChalamchala for updating the patch. The change in BackgroundPipelineCreator
looks good.
I have some concern about the the changes in acceptance tests.
- Same additional config is applied to both client and server-side, so we are not testing all possible combinations.
- We don't need to start a new cluster to test different client-side config.
- No need to run all (basic) EC tests, since we just want to verify the replication type of the keys getting created. Various data sizes are tested to exercise EC write/read paths, but this is independent of where the replication config is coming from. So for testing precedence of settings creating one small key per test case would be enough.
Usually I'm in favor of acceptance tests, but in this case I think it's better to add integration test cases instead. We can more easily generate a test matrix for combinations over: client config, client CLI options, bucket replication type, server config (2 different keys). Let me know if you would like more specific examples, or if you'd prefer someone else to implement the test.
The old ordering in (2) and (3) is fine as long as the same order is followed in all the code paths. As @adoroszlai mentioned we can simulate this in integration tests with all possible combinations. |
Thanks for the review @adoroszlai and @aswinshakil. Updated the patch. |
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.
Thanks @SaketaChalamchala for updating the patch.
There are some checkstyle failures.
...ration-test/src/test/java/org/apache/hadoop/ozone/shell/TestReplicationConfigPreference.java
Outdated
Show resolved
Hide resolved
Can you please check test failures?
|
What changes were proposed in this pull request?
Setting the ozone.replication.type and ozone.replication configs to EC causes SCM to crash. This is because the BackgroundPipelineCreator does not skip pipeline creation when replication type is EC and tries to create an EC pipeline with HddsProtos.ReplicationFactor (ZERO, ONE, THREE) which is not supported.
BackgroundPipelineCreator should not be creating EC pipelines. The proposed solution skips creating pipelines if ozone.replication.type is EC unless ozone.scm.pipeline.creation.auto.factor.one=true in which case, only RATIS ONE pipelines are created by BackgroundPipelineCreator.
The order of replication config resolution of key is not as expected causing existing acceptance tests to fail.
Current order of key's replication config resolution is:
1. Replication config parameters passed from client during key create.
2. Replication config from client side configs if parameters are not passed.
3. Bucket replication config if client side parameters are not passed.
4. Server side default if bucket replication config is null.
So, if ozone.replication.type is set to EC and a key is created in a bucket, the key is always created with EC replication regardless of whether the bucket's replication config is EC or RATIS. The same goes for if ozone.replication.type is set to RATIS.
The expected order of replication config resolution for key should be:
1. Replication config parameters passed from client during key create.
2. Bucket replication config if client side parameters are not passed.
3. Replication config from client side configs if bucket replication config is null.
3. Server side default config.
So, this way key creation always used bucket replication configs unless replication config params are specifically passed through the client. It will default to server default replication config only if both key params and bucket replication config are null.
The order of replication config resolution of bucket is not as expected causing existing acceptance tests to fail.
Current order of bucket's replication config resolution is
1. Replication config parameters passed from client during bucket create.
2. Server side default config if parameters are not passed.
So, this means ozone.replication configs has no effect on bucket creation. You can set it to EC or RATIS but default bucket creation will always use the server default replication config.
The proposed and I think expected order of bucket's replication config resolution should be
1. Replication config parameters passed from client during bucket create.
2. Replication config from client side configs if parameters are not passed.
3. Server side default if client side replication config is null.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10336
How was this patch tested?
Acceptance test.