Repository navigation
Conversation
After broker configs, this patch completes the ClusterMirrorConfig class. Note: I removed the final "s" from the class name because all the other configuration classes end with "Config". Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
bb516c5 to
61737f5
Compare
showuon
left a comment
There was a problem hiding this comment.
Thanks for adding the tests. LGTM, Only one minor comment.
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
|
Thanks @fvaleri for the pr, quick comment the pattern and ACL configs ( I believe here when a value is invalid, the exception thrown at that point is not a
So once the create-mirror path uses this config, a typo wouldn't come back Could we add validators to these WDYT? |
| * @param config the broker configuration | ||
| */ | ||
| public ClusterMirrorConfig(AbstractConfig config) { | ||
| super(BROKER_CONFIG_DEF, config.originals(), false); |
There was a problem hiding this comment.
General thought here ... ClusterMirrorConfig now covers two separate config sets depending on the constructor: fromProperties builds a mirror-level config from CONFIG_DEF, and ClusterMirrorConfig(AbstractConfig) builds a broker-level one from BROKER_CONFIG_DEF. All the getters are on the same class, so calling the wrong one compiles fine but fails at runtime. For example, fetchBackoffMs() on a broker-level instance throws Unknown configuration, and topicsIncludePattern() returns null.
Could we split them the way group configs are split? GroupCoordinatorConfig wraps the broker config, and GroupConfig extends AbstractConfig for per-group configs. For example, keep ClusterMirrorConfigs (or a ClusterMirrorCoordinatorConfig) for the broker-level configs and use ClusterMirrorConfig only for the mirror-level ones. The broker-level constructor isn't used in this PR yet, so now is the easiest time to split it. WDYT?
OmniaGM
left a comment
There was a problem hiding this comment.
I've finished the first round of review. Before approving, I'd like us to resolve:
- validation for the regex/ACL configs (so invalid values fail with ConfigException)
- the SASL configs: the PLAIN default, the missing configs (like OAUTHBEARER)
- splitting the broker-level and mirror-level configs into separate classes
The rest are small nits/doc fixes, feel free to address them here or in a follow-up.
Signed-off-by: Federico Valeri <fedevaleri@gmail.com>
After broker configs, this patch completes the ClusterMirrorConfig
class. Note: I removed the final "s" from the class name because all the
other configuration classes end with "Config".
Reviewers: Luke Chen showuon@gmail.com, Omnia Ibrahim o.g.h.ibrahim@gmail.com