Myasuka commented on a change in pull request #7711: [FLINK-11618][state]
Refactor operator state repartition mechanism
URL: https://github.com/apache/flink/pull/7711#discussion_r259289543
##########
File path:
flink-state-backends/flink-statebackend-rocksdb/src/test/java/org/apache/flink/contrib/streaming/state/RocksIncrementalCheckpointRescalingTest.java
##########
@@ -159,6 +167,18 @@ public void testScalingUp() throws Exception {
// -----------------------------------------> test rescaling
from 2 to 3 <---------------------------------------
+ // init state for new subtask-0
+ initState1 =
AbstractStreamOperatorTestHarness.repartitionOperatorState(
Review comment:
Repartitioning operator state took place within
`AbstractStreamOperatorTestHarness#initializeState` method previously. This is
actually not so good due to Flink actually repartition state before letting
`AbstractStreamOperator#initializeState` in normal lifescyle. The root cause
why I have to change is that previous
`OperatorStateRepartitiomer#repartitionState` doesn't need the old parallelism
while my new method need that old parallelism. However,
`AbstractStreamOperatorTestHarness` cannot know the old parallelism, and I have
to add a new static method with old parallelism provided to split the
repartition state logic out. I think this is more like the normal state assign
logic:
state already repartitioned before initialize the stream operator.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services