anishshri-db commented on code in PR #52035:
URL: https://github.com/apache/spark/pull/52035#discussion_r2279740445
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/state/RocksDBStateStoreCheckpointFormatV2Suite.scala:
##########
@@ -1195,44 +1195,52 @@ class RocksDBStateStoreCheckpointFormatV2Suite extends
StreamTest
validateCheckpointInfo(6, 1, Set(2, 4, 6))
}
- testWithCheckpointInfoTracked(
- s"checkpointFormatVersion2 validate StreamingGlobalLimit") {
- withTempDir { checkpointDir =>
- val inputData = MemoryStream[Int]
- val aggregated = inputData
- .toDF()
- .limit(10)
-
- testStream(aggregated, Append)(
- StartStream(checkpointLocation = checkpointDir.getAbsolutePath),
- AddData(inputData, 3),
- CheckLastBatch(3),
- AddData(inputData, 3, 2),
- CheckLastBatch(3, 2),
- StopStream
- )
-
- // Test recovery
- testStream(aggregated, Append)(
- StartStream(checkpointLocation = checkpointDir.getAbsolutePath),
- AddData(inputData, 4, 1, 3),
- CheckLastBatch(4, 1, 3),
- AddData(inputData, 5, 4, 4),
- CheckLastBatch(5, 4, 4),
- StopStream
- )
- // crash recovery again
- testStream(aggregated, Append)(
- StartStream(checkpointLocation = checkpointDir.getAbsolutePath),
- AddData(inputData, 4, 7),
- CheckLastBatch(4),
- AddData(inputData, 5),
- CheckLastBatch(),
- StopStream
- )
+ // No matter the number of shuffle partitions, global limit should always
use one partition
+ Seq(1, 2, 10, 200).foreach { shufflePartitions =>
+ testWithCheckpointInfoTracked(
+ s"checkpointFormatVersion2 validate StreamingGlobalLimit with " +
+ s"shufflePartitions = $shufflePartitions") {
Review Comment:
nit: this can be at the same indent as the line above
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]