{"action":"created","issue":{"url":"https://api.github.com/repos/confluentinc/ksql/issues/307","repository_url":"https://api.github.com/repos/confluentinc/ksql","labels_url":"https://api.github.com/repos/confluentinc/ksql/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/confluentinc/ksql/issues/307/comments","events_url":"https://api.github.com/repos/confluentinc/ksql/issues/307/events","html_url":"https://github.com/confluentinc/ksql/issues/307","id":259838587,"number":307,"title":"Table creation throws io.confluent.ksql.exception.KafkaResponseGetFailedException: Failed to guarantee existence of topic","user":{"login":"alexhafner","id":19378031,"avatar_url":"https://avatars3.githubusercontent.com/u/19378031?v=4","gravatar_id":"","url":"https://api.github.com/users/alexhafner","html_url":"https://github.com/alexhafner","followers_url":"https://api.github.com/users/alexhafner/followers","following_url":"https://api.github.com/users/alexhafner/following{/other_user}","gists_url":"https://api.github.com/users/alexhafner/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhafner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhafner/subscriptions","organizations_url":"https://api.github.com/users/alexhafner/orgs","repos_url":"https://api.github.com/users/alexhafner/repos","events_url":"https://api.github.com/users/alexhafner/events{/privacy}","received_events_url":"https://api.github.com/users/alexhafner/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-22T14:45:22Z","updated_at":"2018-04-10T03:47:13Z","closed_at":"2018-03-05T22:26:57Z","author_association":"NONE","body":"On creating tables in the CLI, we ran into \r\n\r\n`io.confluent.ksql.exception.KafkaResponseGetFailedException: Failed to guarantee existence of topic PAGEVIEWS_AVG_1`\r\n\r\nwhen creating a table like so:\r\n\r\n```\r\nCREATE TABLE pageviews_avg_1b \\\r\n    AS SELECT \\\r\n        userid, \\\r\n      SUM(viewtime) AS sum_viewtime, \\\r\n      MIN(viewtime) AS min_viewtime, \\\r\n      MAX(viewtime) AS max_viewtime, \\\r\n      COUNT(*) AS view_count \\\r\n    FROM pageviews \\\r\n    WINDOW SESSION (60 SECONDS) GROUP BY userid;\r\n\r\n```\r\nIf we re-issued that statement, the table would create fine and SELECT worked.\r\n\r\nThis could be reproduced within the session (CREATE TABLE pageviews_avg_1c etc) , and also happened on another CLI session by another user. Exiting the CLI and starting it again healed the issue, and the tables then created straight away.\r\n\r\nAfter a while, the issue started happening again in the session where it just worked\r\n\r\nThe CLI log showed\r\n\r\n```\r\n[2017-09-22 14:35:34,795] ERROR io.confluent.ksql.exception.KafkaResponseGetFailedException: Failed to guarantee existence of topic PAGEVIEWS_AVG_1A\r\n\tat io.confluent.ksql.util.KafkaTopicClientImpl.createTopic(KafkaTopicClientImpl.java:63)\r\n\tat io.confluent.ksql.structured.SchemaKStream.createSinkTopic(SchemaKStream.java:336)\r\n\tat io.confluent.ksql.structured.SchemaKTable.into(SchemaKTable.java:70)\r\n\tat io.confluent.ksql.structured.SchemaKTable.into(SchemaKTable.java:51)\r\n\tat io.confluent.ksql.physical.PhysicalPlanBuilder.buildOutput(PhysicalPlanBuilder.java:208)\r\n\tat io.confluent.ksql.physical.PhysicalPlanBuilder.kafkaStreamsDsl(PhysicalPlanBuilder.java:127)\r\n\tat io.confluent.ksql.physical.PhysicalPlanBuilder.kafkaStreamsDsl(PhysicalPlanBuilder.java:104)\r\n\tat io.confluent.ksql.physical.PhysicalPlanBuilder.buildPhysicalPlan(PhysicalPlanBuilder.java:100)\r\n\tat io.confluent.ksql.QueryEngine.buildQueryPhysicalPlan(QueryEngine.java:221)\r\n\tat io.confluent.ksql.QueryEngine.buildPhysicalPlans(QueryEngine.java:199)\r\n\tat io.confluent.ksql.KsqlEngine.planQueries(KsqlEngine.java:139)\r\n\tat io.confluent.ksql.KsqlEngine.buildMultipleQueries(KsqlEngine.java:125)\r\n\tat io.confluent.ksql.rest.server.computation.StatementExecutor.startQuery(StatementExecutor.java:331)\r\n\tat io.confluent.ksql.rest.server.computation.StatementExecutor.executeStatement(StatementExecutor.java:274)\r\n\tat io.confluent.ksql.rest.server.computation.StatementExecutor.handleStatementWithTerminatedQueries(StatementExecutor.java:215)\r\n\tat io.confluent.ksql.rest.server.computation.StatementExecutor.handleStatement(StatementExecutor.java:114)\r\n\tat io.confluent.ksql.rest.server.computation.CommandRunner.executeStatement(CommandRunner.java:109)\r\n\tat io.confluent.ksql.rest.server.computation.CommandRunner.run(CommandRunner.java:75)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.TopicExistsException: Topic 'PAGEVIEWS_AVG_1A' already exists.\r\n\tat org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)\r\n\tat org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)\r\n\tat org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:89)\r\n\tat org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:213)\r\n\tat io.confluent.ksql.util.KafkaTopicClientImpl.createTopic(KafkaTopicClientImpl.java:61)\r\n\t... 18 more\r\nCaused by: org.apache.kafka.common.errors.TopicExistsException: Topic 'PAGEVIEWS_AVG_1A' already exists.\r\n (io.confluent.ksql.rest.server.computation.StatementExecutor:220)\r\n```"},"comment":{"url":"https://api.github.com/repos/confluentinc/ksql/issues/comments/379965030","html_url":"https://github.com/confluentinc/ksql/issues/307#issuecomment-379965030","issue_url":"https://api.github.com/repos/confluentinc/ksql/issues/307","id":379965030,"user":{"login":"rajnishgarg","id":24533090,"avatar_url":"https://avatars3.githubusercontent.com/u/24533090?v=4","gravatar_id":"","url":"https://api.github.com/users/rajnishgarg","html_url":"https://github.com/rajnishgarg","followers_url":"https://api.github.com/users/rajnishgarg/followers","following_url":"https://api.github.com/users/rajnishgarg/following{/other_user}","gists_url":"https://api.github.com/users/rajnishgarg/gists{/gist_id}","starred_url":"https://api.github.com/users/rajnishgarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajnishgarg/subscriptions","organizations_url":"https://api.github.com/users/rajnishgarg/orgs","repos_url":"https://api.github.com/users/rajnishgarg/repos","events_url":"https://api.github.com/users/rajnishgarg/events{/privacy}","received_events_url":"https://api.github.com/users/rajnishgarg/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T03:47:13Z","updated_at":"2018-04-10T03:47:13Z","author_association":"NONE","body":"@apurvam Could you please provide, when you guys have plan for the release target (Last one is 1 feb) and looks like after that there are many fixes ?"}}
{"actor":{"display_login":"rajnishgarg"}}