8000 fix(inkless:controller): skip unchanged control plane connection string record by jeqo · Pull Request #852 · aiven/inkless · GitHub
[go: up one dir, main page]

fix(inkless:controller): skip unchanged control plane connection string record - #852

Merged
gqmelo merged 1 commit into
mainfrom
jeqo/fix-cp-config
Nov 5, 2026
Merged

gqmelo merged 1 commit into
mainfrom
jeqo/fix-cp-config

Conversation

@jeqo
@jeqo jeqo commented Nov 4, 2026 •
Copy link
Copy Markdown
Contributor

incrementalAlterConfig and legacyAlterConfigs emit a ConfigRecord for every SET on a BROKER resource, even when the value is unchanged. KAFKA-14136 added this so brokers reload an SSL keystore or truststore file that changed on disk. A client that re-applies inkless.control.plane.connection.string on a timer therefore appends one metadata record per tick.

The reason for KAFKA-14136 does not apply to this key:

  • It is not one of the reloadable file configs (ssl.keystore.location, ssl.truststore.location).
  • It is valid only on the default broker resource, and the file reload runs only for per-broker resources.
  • On the default resource, a broker diffs the replayed properties against its current config and calls no reconfigurable when nothing changed (DynamicBrokerConfig.processReconfiguration). An unchanged record is already a no-op.

Skip the record for this key only, in both alter paths. Other BROKER configs, including the read and write connection strings, keep emitting a record. Topic configs already skip unchanged values.

DynamicBrokerConfigTest pins that re-applying an unchanged value does not reconfigure.

@jeqo
jeqo requested a balanced review from Copilot November 4, 2026 14:02
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The legacyAlterConfigs path lacks regression coverage for suppressing unchanged control-plane connection strings while preserving records for other unchanged broker configs and implicit deletion when the connection string is omitted.

1 open issue
What changed in this PR

This PR reduces redundant controller metadata records when clients reapply an unchanged Inkless control-plane connection string, while preserving reload behavior for other broker configs.

Changes:

  • Skip unchanged control-plane connection string records in both incremental and legacy config updates.
  • Add incremental-update tests for unchanged and changed connection strings, other broker configs, and topic configs.
File Description
metadata/​src/​test/​java/​org/​apache/​kafka/​controller/​ConfigurationControlManagerTest.java Add regression tests for incremental config record generation.
metadata/​src/​main/​java/​org/​apache/​kafka/​controller/​ConfigurationControlManager.java Exempt the unchanged control-plane connection string from broker reload records in both update paths.

Review effort: Balanced

@jeqo
jeqo force-pushed the jeqo/fix-cp-config branch from bfe48e1 to f7b0012 Compare November 4, 2026 14:10
@jeqo
jeqo requested a balanced review from Copilot November 4, 2026 14:10
Copilot AI left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change to avoid redundant metadata records for unchanged control plane connection strings.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@jeqo
jeqo marked this pull request as ready for review November 4, 2026 14:16
@jeqo
jeqo requested a review from gqmelo November 4, 2026 14:16
@jeqo
jeqo requested a review from gqmelo November 4, 2026 15:01
…ng record

`incrementalAlterConfig` and `legacyAlterConfigs` emit a `ConfigRecord` for every `SET` on a `BROKER` resource, even when the value is unchanged. KAFKA-14136 added this so brokers reload an SSL keystore or truststore file that changed on disk. A client that re-applies `inkless.control.plane.connection.string` on a timer therefore appends one metadata record per tick.

The reason for KAFKA-14136 does not apply to this key:

- It is not one of the reloadable file configs (`ssl.keystore.location`, `ssl.truststore.location`).
- It is valid only on the default broker resource, and the file reload runs only for per-broker resources.
- On the default resource, a broker diffs the replayed properties against its current config and calls no reconfigurable when nothing changed (`DynamicBrokerConfig.processReconfiguration`). An unchanged record is already a no-op.

Skip the record for this key only, in both alter paths. Other `BROKER` configs, including the read and write connection strings, keep emitting a record. Topic configs already skip unchanged values.

`DynamicBrokerConfigTest` pins that re-applying an unchanged value does not reconfigure.

Assisted-by: Claude Sonnet 5.5
@jeqo
jeqo force-pushed the jeqo/fix-cp-config branch from 61e443d to 0eb93ea Compare November 4, 2026 15:07
@gqmelo
gqmelo merged commit e2921f6 into main Nov 5, 2026
6 checks passed
@gqmelo
gqmelo deleted the jeqo/fix-cp-config branch November 5, 2026 08:32
gqmelo pushed a commit that referenced this pull request Nov 5, 2026
…ng record (#852)

`incrementalAlterConfig` and `legacyAlterConfigs` emit a `ConfigRecord` for every `SET` on a `BROKER` resource, even when the value is unchanged. KAFKA-14136 added this so brokers reload an SSL keystore or truststore file that changed on disk. A client that re-applies `inkless.control.plane.connection.string` on a timer therefore appends one metadata record per tick.

The reason for KAFKA-14136 does not apply to this key:

- It is not one of the reloadable file configs (`ssl.keystore.location`, `ssl.truststore.location`).
- It is valid only on the default broker resource, and the file reload runs only for per-broker resources.
- On the default resource, a broker diffs the replayed properties against its current config and calls no reconfigurable when nothing changed (`DynamicBrokerConfig.processReconfiguration`). An unchanged record is already a no-op.

Skip the record for this key only, in both alter paths. Other `BROKER` configs, including the read and write connection strings, keep emitting a record. Topic configs already skip unchanged values.

`DynamicBrokerConfigTest` pins that re-applying an unchanged value does not reconfigure.

Assisted-by: Claude Sonnet 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
On 4.3, `incrementalAlterConfig`, `legacyAlterConfigs`, `ReplicationControlManager#createTopics`, `Controller#createTopics`, and `ControllerApis#createTopics` take a `forwarded` flag, and `MetadataDelta` has no public constructor, only `MetadataDelta.Builder`. The tests added by #832, #835, #839, #845, #846, and #852 used the main signatures.

Assisted-by: Claude Opus 5.5
gqmelo pushed a commit that referenced this pull request Nov 5, 2026
…ng record (#852)

`incrementalAlterConfig` and `legacyAlterConfigs` emit a `ConfigRecord` for every `SET` on a `BROKER` resource, even when the value is unchanged. KAFKA-14136 added this so brokers reload an SSL keystore or truststore file that changed on disk. A client that re-applies `inkless.control.plane.connection.string` on a timer therefore appends one metadata record per tick.

The reason for KAFKA-14136 does not apply to this key:

- It is not one of the reloadable file configs (`ssl.keystore.location`, `ssl.truststore.location`).
- It is valid only on the default broker resource, and the file reload runs only for per-broker resources.
- On the default resource, a broker diffs the replayed properties against its current config and calls no reconfigurable when nothing changed (`DynamicBrokerConfig.processReconfiguration`). An unchanged record is already a no-op.

Skip the record for this key only, in both alter paths. Other `BROKER` configs, including the read and write connection strings, keep emitting a record. Topic configs already skip unchanged values.

`DynamicBrokerConfigTest` pins that re-applying an unchanged value does not reconfigure.

Assisted-by: Claude Sonnet 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
On 4.2, `MetadataDelta` has no public constructor, only `MetadataDelta.Builder`. `HostedPartition.Online` and `HostedPartition.Offline` take no type parameter, `MemoryRecords` and `SimpleRecord` are in `org.apache.kafka.common.record`, and the Scala `BrokerReconfigurable` returns a Scala set. The tests added by #835, #840, #841, #850, and #852 used the main signatures.

The Java `UnifiedLogTest` on 4.2 is a stub, and the log tests still live in the Scala `kafka.log.UnifiedLogTest`. The cherry-pick of #840 ports its four `forceDeleteLocalSegmentsBelow` tests to the Scala suite instead of pulling the upstream Java tests in through the conflict.

Assisted-by: Claude Opus 5.5
gqmelo pushed a commit that referenced this pull request Nov 5, 2026
…ng record (#852)

`incrementalAlterConfig` and `legacyAlterConfigs` emit a `ConfigRecord` for every `SET` on a `BROKER` resource, even when the value is unchanged. KAFKA-14136 added this so brokers reload an SSL keystore or truststore file that changed on disk. A client that re-applies `inkless.control.plane.connection.string` on a timer therefore appends one metadata record per tick.

The reason for KAFKA-14136 does not apply to this key:

- It is not one of the reloadable file configs (`ssl.keystore.location`, `ssl.truststore.location`).
- It is valid only on the default broker resource, and the file reload runs only for per-broker resources.
- On the default resource, a broker diffs the replayed properties against its current config and calls no reconfigurable when nothing changed (`DynamicBrokerConfig.processReconfiguration`). An unchanged record is already a no-op.

Skip the record for this key only, in both alter paths. Other `BROKER` configs, including the read and write connection strings, keep emitting a record. Topic configs already skip unchanged values.

`DynamicBrokerConfigTest` pins that re-applying an unchanged value does not reconfigure.

Assisted-by: Claude Sonnet 5.5
gqmelo added a commit that referenced this pull request Nov 5, 2026
On 4.1, `RemoteStorageFetchInfo` carries a `TopicPartition` instead of a `TopicIdPartition`, so the remote fetch callback in `ReplicaManager` looks up the topic ID with `topicIdPartition`. `LogReadResult` takes no `Errors` argument, `RetriableRemoteStorageException` doesn't exist and the reclaim floor throws `RemoteStorageException`, and `remote.log.manager.thread.pool.size` sizes the follower pool. `HostedPartition.Online` and `HostedPartition.Offline` take no type parameter, `MemoryRecords` and `SimpleRecord` are in `org.apache.kafka.common.record`, and the Scala `BrokerReconfigurable` returns a Scala set. The changes added by #831, #834, #835, #840, #841, #847, #850, and #852 used the main signatures.

The Java `UnifiedLogTest` on 4.1 is a stub, and the log tests still live in the Scala `kafka.log.UnifiedLogTest`. The cherry-pick of #840 ports its four `forceDeleteLocalSegmentsBelow` tests to the Scala suite instead of pulling the upstream Java tests in through the conflict.

After #847, `kafka.server.ReplicaManager` on 4.1 is too big for SpotBugs to analyze, and `:core:spotbugsMain` fails with `SKIPPED_CLASS_TOO_BIG`. The class is about 400 lines longer on 4.1 than on 4.2 and 4.3, and SpotBugs 4.9.8 fails the same way. The exclude filter now skips that pattern for `ReplicaManager` only.

Assisted-by: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0