...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "apiKey": N, "type": "request", "name": "AlterBrokerPropertyRequest", "validVersions": "0", "flexibleVersions": "0+", "fields": [ { "name": "BrokerId", "type": "int32", "versions": "0+", "about": "The broker id." }, { "name": "BrokerProperties", "type": "[]BrokerProperty", "versions": "0+", "fields": [ { "name": "Key", "type": "string", "versions": "0+", "about": "The property key name." }, { "name": "Value", "type": "bytes", "versions": "0+", "about": "The property value." }, ] } ] } ] } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
/** * Reload security stores after new store setup is done. * @params options options set to reload the security stores */ ReloadSecurityStoresResult reloadSecurityStores(ReloadSecurityStoresOptions options); |
And the store reload options will be available for reloading a set of brokers' store:
Code Block | ||||
---|---|---|---|---|
| ||||
/**
* Reload security stores options.
*/
class ReloadSecurityStoresOptions {
ReloadSecurityStoresOptions(final boolean reloadKeyStore, final boolean reloadTrustStore, final List<Integer> brokerIds);
} |
Proposed Changes
When AdminClient#reloadSecurityStores is called, one or more AlterBrokerPropertyRequests will be sent to the target brokers for security store reloading. For older brokers who could not handle this request, the old alterConfig path should still be effective.
For older admin clients, if the AlterConfigRequest gets forwarded the active controller, the controller shall detect the intention for reloading key/trust store configs by looking at their config path value. If the paths are the same, a separate AlterBrokerPropertyRequest shall be sent to the target broker for store reloading.
Compatibility, Deprecation, and Migration Plan
To summarize, we already take care of every possible combinations of broker/client versions, plus the API being used.
Broker Version | Client Version | Admin API | Expected Behavior |
---|---|---|---|
old | new | alterConfig | work with a warning log |
old | new | storeReload | work with the underlying request translating to AlterConfigRequest |
new | new | alterConfig | Not work, must use storeReload API |
new | new | storeReload | work |
new | old | alterConfig | work, with active controller sending a storeReload request to the target broker |
old | old | alterConfig | N/A |
...