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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]