dajac opened a new pull request, #21008:
URL: https://github.com/apache/kafka/pull/21008

   In https://github.com/apache/kafka/pull/20061, we introduced the 
`CoordinatorMetadataImage` and `CoordinatorMetadataDelta` interfaces to 
basically contain/control how metadata is used within the 
`GroupCoordinatorService`, more precisely within the `GroupCoordinatorShard`. 
When we did the change, we directly changed the `GroupCoordinator` interface to 
take implementation of those interfaces, requiring to wrap the `MetadataImage` 
and the `MetadataDelta` in the `BrokerMetadataPublisher`. While looking at it 
now, I find this not idea for a couple a reasons:
   1) From a `BrokerMetadataPublisher` perspective, propagating metadata should 
be standardized. Basically, all the internal components should work the same 
from his point of view. If a component wants to be more restrictive within his 
scope, it is fine but the publisher should not be aware of this.
   2) From a `GroupCoordinator` perspective, requiring 
`CoordinatorMetadataImage` and `CoordinatorMetadataDelta` limits what we can 
do. For instance, we could move more functionality such as electing shards from 
the `BrokerMetadataPublisher` to the `GroupCoordinatorService` to further 
simplify the metadata publishing and improving the encapsulation of the 
components.
   3) From a `ShareCoordinator` perspective, the abstraction failed short as we 
require `CoordinatorMetadataImage` and `CoordinatorMetadataDelta` in the 
interface but we still require `FeaturesImage` as well. The abstraction fails 
short here.
   
   This patch is an attempt to change this by moving back to requiring 
`MetadataImage` and `MetadataDelta` in the `GroupCoordinator` interface and to 
wrap them within the service itself. It does not change the `ShareCoordinator` 
yet. I will do this as a follow-up if people agree with the general approach.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to