Should I rename the newly split ErasureCodingPolicies to SystemErasureCodingPolicies for clarity?
Yeah, that would be more accurate. Thanks!
the ECPManager is responsible for managing the set of enabled policies, which is different from the full set of system policies.
I got your idea, so in your view the manager is to manage the set of enabled policies (from system ones and user defined ones). In my thought, we need a central place to manage:
- system policies, or the built-in ones;
- user defined policies, input by an CLI command via an XML file;
- enabled policies;
- available policies to choose and enable;
- maybe disabled policies? For those admins want to blacklist but can't just simply remove as already used by some data.
It can have :
- get a list of all policies;
- get a policy by name or id;
- deal with fsimage/editlog persisting user defined policies, or doing the removal;
- maybe a method like isSystemPolicy to tell one policy is system one or not.
Maybe server side tests prefer the manager over the new SystemErasureCodingPolicies since it will also support test of user defined policies.
I think it's a good time to discuss what the manager should do, as quite a few issues on-going may relate to it.