You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "A. Sophie Blee-Goldman (Jira)" <ji...@apache.org> on 2021/05/04 23:50:00 UTC

[jira] [Commented] (KAFKA-12749) Changelog topic config on suppressed KTable lost

    [ https://issues.apache.org/jira/browse/KAFKA-12749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17339355#comment-17339355 ] 

A. Sophie Blee-Goldman commented on KAFKA-12749:
------------------------------------------------

Thanks for filing a ticket – we should try to get this fixed up in 3.0 since it's kind of awkward to just silently drop the user's specified configurations, we're lucky that you happened to notice this at all. Just copying over our observation of the underlying problem:
{quote}Seems like BufferConfigInternal#emitEarlyWhenFull creates a new EagerBufferConfigImpl and passes the two original configs (maxRecords and maxBytes) in to the constructor, but loses the logging configs at that point. Same thing for BufferConfigInternal#shutDownWhenFull 
{quote}
I think we can do a trivial, one-line fix to just pass the logging configs as a parameter to the constructor for an immediate patch in 3.0 (or two lines, one for the EagerBufferConfigImpl and one for the StrictBufferConfigImpl constructed in BufferConfigInternal). And maybe also remove the constructor that doesn't accept a logConfig parameter so you're forced to specify it explicitly, whether it's empty/unspecified or not.

Eventually we probably want to refactor things a bit for a more natural fluent API, and try to future-proof things a bit so we don't accidentally introduce bugs like this again. But that's not as urgent

> Changelog topic config on suppressed KTable lost
> ------------------------------------------------
>
>                 Key: KAFKA-12749
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12749
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.6.0, 2.7.0, 2.6.1, 2.8.0, 2.6.2
>            Reporter: Philip Bourke
>            Priority: Minor
>              Labels: newbie, newbie++
>
> When trying to set the changelog configuration on a suppressed KTable, the config is lost if either {{emitEarlyWhenFull}} or {{shutDownWhenFull}} is set after the logging config.
> This works - 
> {code:java}
> .suppress(Suppressed.untilTimeLimit(Duration.ofMillis(maxIdleIntervalMs), BufferConfig.maxRecords(
>  maxBufferRecords).emitEarlyWhenFull().withLoggingEnabled(changelogConfig)){code}
> but not if you set {{emitEarlyWhenFull}} last.
> See comments in https://issues.apache.org/jira/browse/KAFKA-8147
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)