-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UX: CSAS returns control to UI before completing, subsequent statement fails with Unable to verify the AVRO schema is compatible with KSQL. Subject not found. #1394
Comments
@apurvam yes, this is exactly the sort of bug #2159 is intended to address -- thanks for connecting the dots! Our plan is to, in a follow-up PR, have the CLI by default wait until all previous statements have executed before validating new ones, which should indeed fix this bug. EDIT: Turns out I misunderstood the bug called out in this issue, and #2159 will not fix this bug. See new response below. |
@vcrfxia how will this work in the situation where there are no new records arriving in the source (in the above example, |
Consulted with @rodesai and it turns out #2159 will not fix this bug, for the reason brought up by @rmoff . Currently, KSQL does not register Avro schemas for a topic created via a CSAS statement until the first record flows through. #2159 does not change this behavior, and will not fix the bug as a result. To fix the bug, KSQL should create the Avro schema as part of acknowledging the CSAS statement, rather than waiting for the first record to flow through and having the serializer create the schema. cc @apurvam |
ok. Thanks for the follow up @vcrfxia . We can leave this open then. |
For anyone encountering this issue, a workaround I use for my demos is to include a
|
@vcrfxia is this on the roadmap? Is the only workaround, for now, to explicitly specify the Avro schema in the dependent CT statement? |
I'm not aware of it being on the immediate roadmap, but @MichaelDrogalis or @apurvam can answer definitively. Yes, as you mentioned, one workaround is to specify the schema in the CT statement, rather than rely on schema inference. Another workaround (for the CLI) is to follow the CSAS with a |
We don't have this one on the roadmap right now, unfortunately. |
I am facing the same problem since I migrated from version Besides, the workaround proposed by @rmoff doesn't work for me. Here is the script: https://github.com/ivangfr/springboot-kafka-debezium-ksql/blob/project-update-migration-ksqldb/docker/ksql/researchers-institutes.ksql For now, the only way it works is by running each Update Btw, I am not facing anymore the problem describe above about running a script inside ksqlDB. Everything looks ok now in my project. |
@vcrfxia should this now be fixed, based on #4219 ? |
Hey @rmoff @krisajenkins , are you submitting the two statements (where the latter depends on the former) as two separate requests through the UI or as a single request? I would not expect them to work together as a single request for a reason similar to #4800. If you're submitting them separately and it's still not working I'd be curious to know:
|
@vcrfxia Running it as a single request via |
Adding workflow labels while we assess whether this can be addressed at the same time as #4800 |
If multiple statements are executed "at once", ie, submitted via an input file, earlier statements may create new schemas that later statements depend on. During the sandbox execution, we don't register new schema in SR and thus dependent statement fail inside the sandbox as those schema are not available to them. This fix adds a schema-cache inside to sandbox to capture new schemas to make them available to dependent statements inside the sandbox. Co-authored-by: Victoria Xia <victoria.f.xia281@gmail.com> Closes #1394
I want to be able to run a set of KSQL statements, either cut & paste as part of a demo, or as a script passed to KSQL.
I've hit a problem with this:
What I think is happening is that the CSAS results in a new Avro schema, which is not registered in time before the subsequent statement (which requires it) is executed. The second statement has to be manually retried until it succeeds (a few seconds later).
KSQL needs to either (a) wait until the first statement has fully executed or (b) before throwing the error in the second statement, check if there is some pending change that would allow it to complete without error.
The text was updated successfully, but these errors were encountered: