You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Tuan Nguyen (JIRA)" <ji...@apache.org> on 2017/09/29 21:16:00 UTC

[jira] [Comment Edited] (KAFKA-5989) disableLogging() causes an initialization loop

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

Tuan Nguyen edited comment on KAFKA-5989 at 9/29/17 9:15 PM:
-------------------------------------------------------------

The fix provided by https://github.com/apache/kafka/pull/3983 did the trick in resolving the initialization/restoration loop, but we're not at the finish line yet. Working off of trunk, I've attached the updated [^App2.java] to demonstrate the problem.

Basically:
{{loggingEnabled}}: Records are written to the state store as expected.
{{loggingDisabled}}: Records do not get written to the state store :(

There seems to still be a dependency on changelogs somewhere, but I haven't found it yet.


was (Author: thn929):
The fix provided by https://github.com/apache/kafka/pull/3983 did the trick in resolving the initialization/restoration loop, but we're not at the finish line yet. Working off of trunk, I've attached the updated [^App2.java] to demonstrate the problem.

Basically:
{{loggingEnabled}}: I receive records
{{loggingDisabled}}: I do not receive any records

There seems to still be a dependency on changelogs somewhere, but I haven't found it yet.

> disableLogging() causes an initialization loop
> ----------------------------------------------
>
>                 Key: KAFKA-5989
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5989
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.11.0.1
>            Reporter: Tuan Nguyen
>            Priority: Blocker
>             Fix For: 1.0.0
>
>         Attachments: App2.java, App.java
>
>
> Using {{disableLogging()}} for either of the built-in state store types causes an initialization loop in the StreamThread.
> Case A - this works just fine:
> {code}
> 		final StateStoreSupplier testStore = Stores.create(topic)
> 				.withStringKeys()
> 				.withStringValues()
> 				.inMemory()
> //				.disableLogging() 
> 				.maxEntries(10)
> 				.build();
> {code}
> Case B - this does not:
> {code}
> 		final StateStoreSupplier testStore = Stores.create(topic)
> 				.withStringKeys()
> 				.withStringValues()
> 				.inMemory()
> 				.disableLogging() 
> 				.maxEntries(10)
> 				.build();
> {code}
> A brief debugging dive shows that in Case B, {{AssignedTasks.allTasksRunning()}} never returns true, because of a remnant entry in {{AssignedTasks#restoring}} that never gets properly restored.
> See [^App.java] for a working test (requires ZK + Kafka ensemble, and at least one keyed message produced to the "test" topic)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)