Skip to content

Multiply bugs in spring-cloud-function module related to avro schema regisration #854

@iozho

Description

@iozho

Hi:

I would like to report 3 issues:

  1. It appears that AvroSchemaMessageConverter module has been registered twice in ContextFunctionCatalogAutoConfiguration.functionCatalog:
    image

  2. There is a race condition which causes avro schema registration to fail on initial setup. This happens when a service start and when at least 2 request are made (hence 2 threads are spawn). When one thread sets output conversion to true and the other to false, registration fail since code that we pass to the apache kafka client is bytes[] instead of GenericContainer. Because of that we send wrong schema i.e. {"schema" : "bytes"}. Files FunctionAroundWrapper.java and AvroSchemaUtils.java .
    image
    image

  3. It seems isSkipOutputConversion flag in FunctionInvocationWrapper and Function (functionToInvoke) has different values (own copy). It seems inconsistency issue and it is not clear which one is honored in the execution context.

Let me know if you need more info.

Thanks

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions