-
Notifications
You must be signed in to change notification settings - Fork 14.3k
KAFKA-19156: Streamlined share group configs, with usage in ShareSessionCache #19505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR adds the config group.share.max.share.sessions to ShareGroupConfig Reviewers: Andrew Schofield <aschofield@confluent.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a minor nit.
@@ -104,7 +97,7 @@ public class ShareGroupConfig { | |||
private final String shareGroupPersisterClassName; | |||
|
|||
public ShareGroupConfig(AbstractConfig config) { | |||
// Share groups are enabled in two cases: | |||
// Share groups are enabled in either of the two following cases: | |||
// 1. The internal configuration to enable it is explicitly set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 1. The internal configuration to enable it is explicitly set | |
// 1. The internal configuration to enable it is explicitly set; or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. Updated the comment
@@ -89,24 +87,6 @@ public void testInvalidConfigs() { | |||
assertEquals("Invalid value 11 for configuration group.share.delivery.count.limit: Value must be no more than 10", | |||
assertThrows(ConfigException.class, () -> createConfig(configs)).getMessage()); | |||
|
|||
configs.clear(); | |||
// test for when SHARE_GROUP_MAX_GROUPS_CONFIG is of incorrect data type | |||
configs.put(ShareGroupConfig.SHARE_GROUP_MAX_GROUPS_CONFIG, 10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add unit test for SHARE_GROUP_MAX_SHARE_SESSIONS_CONFIG
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is atleast(1) validation itself for the config. And KIP defines no maximum, so do we need any other validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is atleast(1) validation itself for the config. And KIP defines no maximum, so do we need any other validation?
That is interesting. Should we increase the min value? Maybe it should be equal to or larger than group.share.max.size
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we increase the min value? Maybe it should be equal to or larger than group.share.max.size?
Yeah, that is something to consider. One should consider to have group.share.max.share.sessions
>= group.share.max.size
. @AndrewJSchofield wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@apoorvmittal10 I think that makes a lot of sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. 1 doubt I have here we validate that group.share.max.size
should be minimum 1 but KIP-932 says as minimum to be 10, do we know the reason? And if we want group.share.max.size
to be minimum as 10 then should we increase the minimum for group.share.max.share.sessions
to 10 as well?
There's no right answer here for the minima. The defaults are more important, I think. The purpose of the |
Sounds good. |
This PR removes the group.share.max.groups config. This config was used
to calculate the maximum size of share session cache. But with the new
config group.share.max.share.sessions in place with exactly this
purpose, the ShareSessionCache initialization has also been passed the
new config.
Refer: KAFKA-19156