mirror of https://github.com/apache/kafka.git
KAFKA-19075: Included other share group dynamic configs in extractShareGroupConfigMap method in ShareGroupConfig (#19348)
This PR includes `share.session.timeout.ms` and `share.heartbeat.interval.ms` in the `extractShareGroupConfigMap` method in `ShareGroupConfig`. With this change, the default value of `share.session.timeout.ms` and `share.heartbeat.interval.ms` for every group will be set as the value of the static configs `group.share.session.timeout.ms` and `group.share.heartbeat.interval.ms` respectively Reviewers: Andrew Schofield <aschofield@confluent.io>
This commit is contained in:
parent
d7fa406b32
commit
c3f0890f53
|
@ -553,7 +553,7 @@ public class GroupCoordinatorConfig {
|
|||
public Map<String, Integer> extractGroupConfigMap(ShareGroupConfig shareGroupConfig) {
|
||||
Map<String, Integer> defaultConfigs = new HashMap<>();
|
||||
defaultConfigs.putAll(extractConsumerGroupConfigMap());
|
||||
defaultConfigs.putAll(shareGroupConfig.extractShareGroupConfigMap());
|
||||
defaultConfigs.putAll(shareGroupConfig.extractShareGroupConfigMap(this));
|
||||
return Collections.unmodifiableMap(defaultConfigs);
|
||||
}
|
||||
|
||||
|
|
|
@ -161,9 +161,16 @@ public class ShareGroupConfig {
|
|||
}
|
||||
|
||||
/**
|
||||
* Copy the subset of properties that are relevant to share group.
|
||||
* Copy the subset of properties that are relevant to share group. These configs include those which can be set
|
||||
* statically (for all groups) or dynamically (for a specific group). In those cases, the default value for the
|
||||
* group specific dynamic config (Ex. share.session.timeout.ms) should be the value set for the static config
|
||||
* (Ex. group.share.session.timeout.ms).
|
||||
*/
|
||||
public Map<String, Integer> extractShareGroupConfigMap() {
|
||||
return Map.of(GroupConfig.SHARE_RECORD_LOCK_DURATION_MS_CONFIG, shareGroupRecordLockDurationMs());
|
||||
public Map<String, Integer> extractShareGroupConfigMap(GroupCoordinatorConfig groupCoordinatorConfig) {
|
||||
return Map.of(
|
||||
GroupConfig.SHARE_SESSION_TIMEOUT_MS_CONFIG, groupCoordinatorConfig.shareGroupSessionTimeoutMs(),
|
||||
GroupConfig.SHARE_HEARTBEAT_INTERVAL_MS_CONFIG, groupCoordinatorConfig.shareGroupHeartbeatIntervalMs(),
|
||||
GroupConfig.SHARE_RECORD_LOCK_DURATION_MS_CONFIG, shareGroupRecordLockDurationMs()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue