Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4.0, 2.5.0, 2.4.1
-
None
Description
The MirrorConnectorConfig::CONNECTOR_CONFIG_DEF object is reused across multiple MirrorMaker2 classes, which is fine the most part since it's a constant. However, the actual ConfigDef object itself is mutable, and is mutated when the MirrorTaskConfig class statically constructs its own ConfigDef.
This has two unintended effects:
- Since the two ConfigDef objects for the MirrorConnectorConfig and MirrorTaskConfig classes are actually the same object, the additional properties that the MirrorTaskConfig class defines for its ConfigDef are also added to the MirrorConnectorConfig class's ConfigDef. The impact of this isn't huge since both additional properties have default values, but this does cause those properties to appear in the /connectors/{name}/config/validate endpoint once the MirrorTaskConfig class is loaded for the first time.
- It's possible that, if a config for a MirrorMaker2 connector is submitted at approximately the same time that the MirrorTaskConfig class is loaded, a ConcurrentModificationException will be thrown by the AbstractHerder class when it tries to iterate over all of the keys of the connector's ConfigDef.
Attachments
Issue Links
- links to