-
Notifications
You must be signed in to change notification settings - Fork 278
Incorrect artifact createdOn and modifiedOn date when using Kafka topic storage #723
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
Comments
This may be related to issue #653 |
@carlesarnal and @alesj Any thoughts on this bug? |
Or does this only apply to the Kafka storage which will be deprecated/removed? If so then maybe it doesn't matter. |
Please @alesj, correct me if I'm wrong, but I think this only applies to the Kafka storage. |
Yes, this is Kafka storage only. |
When using the Kafka topic storage, Apicurio sets the artifact
createdOn
andmodifiedOn
metadata fields using the current system timestamp when the record was read out of Kafka (see (1) and (2)). This means that when a server restarts it will return different metadata for the same backing data. It also means that a cluster of Apicurio servers will each return different metadata for the same artifact.Alternatives would be to use the Kafka record timestamps (so the
createdOn
field would match the time that the record was originally produced), or store the timestamps as part of the metadata object.(1)
apicurio-registry/app/src/main/java/io/apicurio/registry/storage/impl/AbstractMapRegistryStorage.java
Lines 209 to 211 in 54d82c2
(2)
apicurio-registry/storage/kafka/src/main/java/io/apicurio/registry/kafka/KafkaRegistryStorage.java
Lines 334 to 339 in a077f18
The text was updated successfully, but these errors were encountered: