prateekm commented on a change in pull request #1200: SAMZA-2360 : Adding 
config stores.init.clean to clean all store-dirs on init, regardless of contents
URL: https://github.com/apache/samza/pull/1200#discussion_r337803901
 
 

 ##########
 File path: 
samza-core/src/main/java/org/apache/samza/storage/NonTransactionalStateTaskRestoreManager.java
 ##########
 @@ -110,20 +110,21 @@
    */
   @Override
   public void init(Map<SystemStreamPartition, String> 
checkpointedChangelogSSPOffsets) {
-    cleanBaseDirsAndReadOffsetFiles();
+    cleanBaseDirsAndReadOffsetFiles(new 
StorageConfig(config).getCleanLoggedStoreDirsOnInit());
 
 Review comment:
   It always deletes the `current` directory, but may restore from a store 
snapshot/checkpoint. So you'll either need to disable restore completely, or 
clear the restored store at the end. 

----------------------------------------------------------------
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

Reply via email to