-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Using Auto Consume consumer on a topic that doesn't have a schema doesn't work #3909
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
Conversation
run java8 tests |
getFunctionStatus(functionName, numMessages); | ||
// get function status. Note that this function might restart a few times until | ||
// the producer above writes the messages. | ||
getFunctionStatus(functionName, numMessages, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why will this restart a couple of times? That doesn't sound like the correct behavior
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its unclear why the correct behavior for that function is to restart. Are we sure we are not rewritting the test to accommodate incorrect behavior?
@jerrypeng currently the way things are plumed inside the client, the schema has to be established at consumer create time before proceeding. Changing this to waiting for the first message before trying to lookup is possible, but I suspect is pretty extensive change. @sijie thoughts? |
@srkukarni @jerrypeng I think current change is the easiest way to fix the integration tests. alternatively we can create the topic prior to doing any tests. |
@sijie @srkukarni should we have a discussion on what the correct behavior of auto consume consumer when there is no topic because the current behavior and the error message it produces is very confusing and not helpful to the user. |
I think if there is no topic, it should fail immediately since auto consume requires topic exists first. That’s the expected behavior. We can change the logging to be more explicit but I don’t think we should change the behavior. |
Motivation
In the testAutoSchemaFunction integration test, we create a function that uses auto_consume. However the function is submitted before a topic/schema is created. This leads to the function failing to start a few times before a producer comes in and produces the schema/messages.
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation