prateekm commented on a change in pull request #1160: Transactional State
[1/5]: Added Store Checkpoint API
URL: https://github.com/apache/samza/pull/1160#discussion_r326766321
##########
File path:
samza-api/src/main/java/org/apache/samza/storage/kv/KeyValueStore.java
##########
@@ -141,4 +144,9 @@ default void deleteAll(List<K> keys) {
* Flushes this key-value store, if applicable.
*/
void flush();
+
+ /**
+ * Checkpoint the store snapshot.
+ */
+ Optional<Path> checkpoint(String id);
Review comment:
Ideally we'd make this a default method with the default impl returning an
empty optional. However because of the way store wrapping works (cached store,
logged store etc.), the correct default behavior for wrapper stores is to call
the underlying store. Given the risk of accidentally forgetting to call the
underlying store checkpoint in any new wrapper implementations if we make this
a default method, I think it'll be better to keep this as a new required method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services