voonhous commented on code in PR #17484:
URL: https://github.com/apache/hudi/pull/17484#discussion_r2587675395
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestPartitionStatsIndex.scala:
##########
@@ -444,8 +444,10 @@ class TestPartitionStatsIndex extends
PartitionStatsIndexTestBase {
val cleanMetadata =
deserializeAvroMetadataLegacy(cleanMetadataBytes.get(),
classOf[HoodieCleanMetadata])
// This clean operation deletes 6 files created by the first commit.
assertTrue(cleanMetadata.getTotalFilesDeleted > 0)
- // Restore to savepoint
- writeClient.restoreToSavepoint(savepointTimestamp)
+ // Restore to savepoint - create a new client for restore operation
+ val restoreClient = new SparkRDDWriteClient(new
HoodieSparkEngineContext(jsc), getWriteConfig(hudiOpts))
+ restoreClient.restoreToSavepoint(savepointTimestamp)
+ restoreClient.close()
Review Comment:
Original `writeClient` was closed above in **line 422**, so i am creating
another writeClient here.
--
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]