Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titleAlterBrokerPropertyRequest.json
{
  "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
languagejava
titleKafkaAdminClient.java
/**
 * 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
languagejava
titleReloadSecurityStoresOptions.java
/**
 * 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 VersionClient VersionAdmin APIExpected Behavior
oldnewalterConfigwork with a warning log
oldnewstoreReloadwork with the underlying request translating to AlterConfigRequest
newnewalterConfigNot work, must use storeReload API
newnewstoreReloadwork
newoldalterConfigwork, with active controller sending a storeReload request to the target broker
oldoldalterConfigN/A

...