KAFKA-18637: Fix max connections per ip and override reconfigurations - #19099
Conversation
frankvicky
left a comment
There was a problem hiding this comment.
@azhar2407 : Thanks for the patch.
I have a small question.
| @MethodSource(Array("getTestQuorumAndGroupProtocolParametersAll")) | ||
| def testSocketServerConfigTest(quorum: String, groupProtocol: String): Unit = { | ||
| val updatedMaxConnections = "20" | ||
| val ConnectionsIpsOverride = "1.2.3.4:1234,1.2.4.5:2345" |
There was a problem hiding this comment.
Pardon me, why do we have a capital case for the first character of this variable?
There was a problem hiding this comment.
seems like a typo. Do you think this prevents the PR merge? Sorry I am new a contributor, trying to understand if this requires a fresh revision?
There was a problem hiding this comment.
No worries.
Although it's not a big issue, I suggest you fix the typo, and welcome to Kafka 😺
There was a problem hiding this comment.
Thanks for the quick fix!
We need to wait for a committer to approve the CI build and review.
e4d98cd to
e627cb6
Compare
e627cb6 to
cbb10de
Compare
clolov
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
m1a2st
left a comment
There was a problem hiding this comment.
Thanks for this PR, LGTM
After dynamically modifying the max.connections.per.ip configuration from 1000 to 10000, the update initially worked as expected. However, after multiple broker restarts, the value reverted to 1000, leading to numerous connection closures.
This issue occurs because the max.connections.per.ip and max.connections.per.ip.override configurations are defined using val. As a result, the values set in server.properties are assigned at initialization, and the KafkaConfig reference used by SocketServer continues to hold the initial static value.