rkhachatryan commented on code in PR #20152:
URL: https://github.com/apache/flink/pull/20152#discussion_r940154643


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/TaskExecutorStateChangelogStoragesManager.java:
##########
@@ -135,28 +148,109 @@ public void releaseStateChangelogStorageForJob(@Nonnull 
JobID jobId) {
         }
     }
 
+    @Nullable
+    StateChangelogStorageView<?> stateChangelogStorageViewForJob(
+            @Nonnull JobID jobID,
+            Configuration configuration,
+            ChangelogStateHandle changelogStateHandle)
+            throws IOException {
+        if (closed) {
+            throw new IllegalStateException(
+                    "TaskExecutorStateChangelogStoragesManager is already 
closed and cannot "
+                            + "register a new StateChangelogStorageView.");
+        }
+
+        if (!(changelogStateHandle instanceof ChangelogStateHandleStreamImpl)) 
{
+            return StateChangelogStorageLoader.loadFromStateHandle(
+                    configuration, changelogStateHandle);
+        }

Review Comment:
   > Yes.
   > But as long as the DSTL implementation is using 
ChangelogStateHandleStreamImpl, then the cache can be used.
   
   `FsStateChangelogStorageFactory` isn't universal, other implementations 
might not use `StateChangeFormat` at all.
   
   I think it might be solved by introducing map<jobId, map<dstl-identifier, 
dstl>>.
   However, given that there is only one production implementation ATM, the 
release timeframe, and that it adds some complexity, I think it's fine to 
assume single implementation.
   If so, the aforementioned branch isn't necessary.



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

Reply via email to