Skip to content
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

Connect parameters not considered in cycleReferences cache #2740

Open
mfvitale opened this issue Aug 25, 2023 · 1 comment
Open

Connect parameters not considered in cycleReferences cache #2740

mfvitale opened this issue Aug 25, 2023 · 1 comment

Comments

@mfvitale
Copy link

mfvitale commented Aug 25, 2023

I am experiencing wrong behavior with this struct data on Kafka Connect.

{
        "type" : "struct",
        "fields" : [ {
          "type" : "int32",
          "optional" : false,
          "field" : "scale"
        }, {
          "type" : "bytes",
          "optional" : false,
          "field" : "value"
        } ],
        "optional" : true,
        "name" : "io.debezium.data.VariableScaleDecimal",
        "version" : 1,
        "doc" : "Variable scaled decimal",
        "parameters" : {
          "precision" : "10"
        },
        "field" : "VAL_F_10"
 }

This will be cached in the fromConnectContext.cycleReferences withname as key but this will cause a cache hit for subsequent data of same type but with different values in others fields (i.e parameters).

I think that parameters should be considered in the cache key, maybe using the entire object schema as key?

if (fromConnectContext.cycleReferences.containsKey(schema.name())) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant