Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
files="(TopologyBuilder|KafkaStreams|KStreamImpl|KTableImpl|StreamThread|StreamTask).java"/>

<suppress checks="MethodLength"
files="(KTableImpl|StreamsPartitionAssignor.java)"/>
files="(KTableImpl|StreamsPartitionAssignor|EosBetaUpgradeIntegrationTest).java"/>

<suppress checks="ParameterNumber"
files="StreamTask.java"/>
Expand All @@ -176,12 +176,16 @@
files="StreamThread.java"/>
<suppress checks="CyclomaticComplexity"
files="TaskManager.java"/>
<suppress checks="CyclomaticComplexity"
files="EosBetaUpgradeIntegrationTest.java"/>

<suppress checks="JavaNCSS"
files="StreamsPartitionAssignor.java"/>
<suppress checks="JavaNCSS"
files="EosBetaUpgradeIntegrationTest.java"/>

<suppress checks="NPathComplexity"
files="(AssignorConfiguration|InternalTopologyBuilder|KafkaStreams|ProcessorStateManager|StreamsPartitionAssignor|StreamThread|TaskManager).java"/>
files="(AssignorConfiguration|EosBetaUpgradeIntegrationTest|InternalTopologyBuilder|KafkaStreams|ProcessorStateManager|StreamsPartitionAssignor|StreamThread|TaskManager).java"/>

<suppress checks="(FinalLocalVariable|UnnecessaryParentheses|BooleanExpressionComplexity|CyclomaticComplexity|WhitespaceAfter|LocalVariableName)"
files="Murmur3.java"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ public class StreamsConfig extends AbstractConfig {
static {
final Map<String, Object> tempProducerDefaultOverrides = new HashMap<>();
tempProducerDefaultOverrides.put(ProducerConfig.LINGER_MS_CONFIG, "100");
// Reduce the transaction timeout for quicker pending offset expiration on broker side.
tempProducerDefaultOverrides.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, 10000);

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.

nit: Could you add the original comment explaining why we set it to smaller value too?

PRODUCER_DEFAULT_OVERRIDES = Collections.unmodifiableMap(tempProducerDefaultOverrides);
}

Expand Down Expand Up @@ -1273,9 +1275,6 @@ public Map<String, Object> getProducerConfigs(final String clientId) {
// add client id with stream client id prefix
props.put(CommonClientConfigs.CLIENT_ID_CONFIG, clientId);

// Reduce the transaction timeout for quicker pending offset expiration on broker side.
props.put(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, 10000);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Minor bug: this value was hard coded and it was not possible to overwrite it.


return props;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,11 @@ public void shouldOverrideStreamsDefaultConsumerConfigs() {
@Test
public void shouldOverrideStreamsDefaultProducerConfigs() {
props.put(StreamsConfig.producerPrefix(ProducerConfig.LINGER_MS_CONFIG), "10000");
props.put(StreamsConfig.producerPrefix(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG), "30000");
final StreamsConfig streamsConfig = new StreamsConfig(props);
final Map<String, Object> producerConfigs = streamsConfig.getProducerConfigs(clientId);
assertEquals("10000", producerConfigs.get(ProducerConfig.LINGER_MS_CONFIG));
assertEquals("30000", producerConfigs.get(ProducerConfig.TRANSACTION_TIMEOUT_CONFIG));
}

@Test
Expand Down
Loading