gaoyunhaii commented on a change in pull request #14754:
URL: https://github.com/apache/flink/pull/14754#discussion_r592968789
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/metadata/MetadataV3Serializer.java
##########
@@ -103,11 +105,16 @@ protected void serializeOperatorState(OperatorState
operatorState, DataOutputStr
serializeStreamStateHandle(operatorState.getCoordinatorState(), dos);
// Sub task states
- final Map<Integer, OperatorSubtaskState> subtaskStateMap =
operatorState.getSubtaskStates();
- dos.writeInt(subtaskStateMap.size());
- for (Map.Entry<Integer, OperatorSubtaskState> entry :
subtaskStateMap.entrySet()) {
- dos.writeInt(entry.getKey());
- serializeSubtaskState(entry.getValue(), dos);
+ if (operatorState.isFullyFinished()) {
+ dos.writeInt(-1);
Review comment:
I'm a bit hesitate here since we should not be able to add new field to
the meta data since it would impact the compatibility. There would be the cases
that user taking a savepoint or external checkpoint with an older version (like
1.12) and resume the savepoint/checkpoint with new version (like the 1.13) to
do the upgrade. If we add new fields, we should not e able to parse the
existing savepoint / checkpoint ?
----------------------------------------------------------------
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]