You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/01/13 12:43:41 UTC

[GitHub] [flink] Myasuka commented on a change in pull request #18297: [FLINK-25395][state] Fix TM error handling when uploading shared state

Myasuka commented on a change in pull request #18297:
URL: https://github.com/apache/flink/pull/18297#discussion_r783922498



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateHandleStreamImpl.java
##########
@@ -83,11 +80,7 @@ public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) {
 
     @Override
     public void discardState() throws Exception {
-        // discard only on TM; on JM, shared state is removed on subsumption
-        if (stateRegistry == null) {
-            bestEffortDiscardAllStateObjects(
-                    handlesAndOffsets.stream().map(t2 -> t2.f0).collect(Collectors.toList()));
-        }
+        // do nothing: rely on SharedStateRegistry for cleanup after ACK;

Review comment:
       When would the `handlesAndOffsets` be deleted then?

##########
File path: flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/snapshot/RocksIncrementalSnapshotStrategy.java
##########
@@ -493,12 +482,10 @@ private void uploadSstFiles(
                     // ignore an older upload if it completed after a newer one has completed
                     if (checkpointId > lastCheckpointIdUploadedSst) {
                         lastCheckpointIdUploadedSst = checkpointId;

Review comment:
       `lastCheckpointIdUploadedSst` is no longger useful.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/changelog/ChangelogStateHandleStreamImpl.java
##########
@@ -83,11 +80,7 @@ public KeyedStateHandle getIntersection(KeyGroupRange keyGroupRange) {
 
     @Override
     public void discardState() throws Exception {
-        // discard only on TM; on JM, shared state is removed on subsumption
-        if (stateRegistry == null) {

Review comment:
       The private `stateRegistry` could be also removed from this class.




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org