prateekm commented on code in PR #1657:
URL: https://github.com/apache/samza/pull/1657#discussion_r1143770748
##########
samza-core/src/main/java/org/apache/samza/storage/NonTransactionalStateTaskRestoreManager.java:
##########
@@ -339,7 +339,7 @@ private Map<String, StorageEngine>
createStoreEngines(Set<String> storeNames, Jo
// Put non persisted stores
nonPersistedStores.forEach(storageEngines::put);
// Create persisted stores
- storeNames.forEach(storeName -> {
+ storeNames.stream().filter(s ->
!nonPersistedStores.containsKey(s)).forEach(storeName -> {
Review Comment:
Part of a bug fix: in-memory stores configured with a changelog were being
restored from the changelog, but were being replaced with a new empty store
after the restore.
This method is putting pre-created and passed in in-memory stores to the
storageEngines map in line 340 above this. But it is then overwriting it with a
newly created in-memory store in this section because it does not exclude
in-memory stores from the list. This new store is the one that will be restored
from changelog. But the caller (ContainerStorageManager) is holding on to the
passed in in-memory store expecting it to be restored instead.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]