Closed loicmathieu closed 1 year ago
To be able to answer I would like to know more information, specifically about the lock mode you're using, the lock timeout etc, especially if you changed them to non-default values.
Thanks!
@carlesarnal I just use the schema registry docker container with only confluent serializer/deserializer and the error pops up from time to time inside my test cases (which use testcontainers to start the container). I didn't specify anything about any lock.
As you probably know, the default lock time is relatively low (1s). Do you mind trying to increase it and see what happens?
Thanks!
@carlesarnal I have no idea there was such settings and also have no idea how to increase it via the docker image.
By default Apicurio Registry sets the jdbc url using the env var REGISTRY_DATASOURCE_URL. The default value when the in-memory version is used is jdbc:h2:mem:registry_db
, you can try setting that value to jdbc:h2:mem:registry_db;DEFAULT_LOCK_TIMEOUT=5000
.
Thanks @carlesarnal I'll try it tomorrow and let you know
Hi @loicmathieu , do you mind sharing how to reproduce the issue on our side?
Meanwhile, I find this comment possibly relevant: https://stackoverflow.com/a/4162685
We are using H2 version 1.4.199
so you can try to append also ;MVCC=true
to the DATASOURCE_URL
as @carlesarnal mentioned.
@carlesarnal @andreaTP with both setting I was able to reproduce the issue. I'll try to provide a reproducer but as it's via a complex Quarkus test using automatic container (devservices) this may not be easy to reproduce.
I have the same issue as you, @loicmathieu. I am using Quarkus with Confluent Avro serializers and the apicurio dev-services container. I only had this problem when using Quarkus' built-in Kafka integration that relies on Smallrye Reactive Messaging. When directly using a KafkaProducer which uses the Apicurio container to write to Kafka, I don't have any issues.
Are you using Smallrye to write to Kafka?
@donare yes, the issue arise when using Quarkus Smallrye Reactive Messaging Kafka extension.
One bit of news that is possibly unrelated. We have improved the in-memory version of registry that is used as part of dev mode. We are now creating a native version. This should improve startup time drastically, but I'm not sure if it will have any impact on this issue.
Agreed, we're not only creating a native version now, but also the h2 version has been significantly updated (from 1.4.x to 2.x) so worth trying. @loicmathieu do you mind trying on your side?
Thanks!
@carlesarnal we didn't have this issue since some weeks now, we upgrade Quarkus and Testcontainers so it may fix some issue. I'm closing this one now, I'll repoen it if it stills occurs. Thanks for your feedbacks
Hi, I'm using the docker container
quay.io/apicurio/apicurio-registry-mem:2.2.5.Final
in my integration tests with Confluent serializers. It sometimes, but not always, fails with aTimeout trying to lock table
exception.Complete stacktrace :