-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DGS-10707 Cache checkpoint for cacheInitialized before reader thread starts #3161
Conversation
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.
Thanks @karthikeyanas , left some comments
core/src/main/java/io/confluent/kafka/schemaregistry/storage/KafkaStore.java
Outdated
Show resolved
Hide resolved
@@ -153,7 +157,7 @@ public void init() throws StoreInitializationException { | |||
throw new StoreInitializationException("Illegal state while initializing store. Store " | |||
+ "was already initialized"); | |||
} | |||
this.storeUpdateHandler.cacheInitialized(new HashMap<>(kafkaTopicReader.checkpoints())); | |||
this.storeUpdateHandler.cacheInitialized(new HashMap<>(checkpoints)); |
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.
this.storeUpdateHandler.cacheInitialized(new HashMap<>(checkpoints)); | |
this.storeUpdateHandler.cacheInitialized(checkpoints); |
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.
The current change doesn't do anything, we need to copy the map earlier
Also we should target 7.0.x with this PR |
What
Cache checkpoint for cacheInitialized before reader thread starts. Checkpoint could be updated once the reader thread starts. This could result in a race condition where schemas after the checkpoint during startup would be double counted.
References
https://confluentinc.atlassian.net/browse/DGS-10707