laskoviymishka commented on code in PR #16602:
URL: https://github.com/apache/iceberg/pull/16602#discussion_r4429019617
##########
kafka-connect/kafka-connect-transforms/src/test/java/org/apache/iceberg/connect/transforms/TestKafkaMetadataTransform.java:
##########
@@ -256,6 +256,39 @@ public void testAppendToMaps() {
}
}
+ @Test
+ @DisplayName("config must be per-instance, not leaked via a static field")
+ public void testConfigIsNotSharedAcrossInstances() {
Review Comment:
New tests drop the `test` prefix and stay package-private per AGENTS.md,
even though the older methods in this file predate that.
```suggestion
void configIsNotSharedAcrossInstances() {
```
##########
kafka-connect/kafka-connect-transforms/src/main/java/org/apache/iceberg/connect/transforms/KafkaMetadataTransform.java:
##########
@@ -97,7 +97,7 @@ public void addToMap(SinkRecord record, Map<String, Object>
map) {
private static final String KEY_METADATA_FIELD_NAME = "field_name";
private static final String KEY_METADATA_IS_NESTED = "nested";
private static final String DEFAULT_METADATA_FIELD_NAME = "_kafka_metadata";
- private static RecordAppender recordAppender;
+ private RecordAppender recordAppender;
Review Comment:
Has anyone hit this in a real deployment, with two connectors or two aliases
using different `field_name`/`nested`/`external_field` in one worker? As I read
[`ConnectorConfig.transformationStages()`](https://github.com/apache/kafka/blob/5e9866f43ab8e7e41ef39e5584ac50019381328d/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/ConnectorConfig.java#L309-L337),
each alias gets its own instance and `configure()` call, so the
last-configured-wins sharing is real. What neither the description nor the
repro in #16601 tells us is whether that setup exists in practice, and I'd like
to understand the need before we merge.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]