henrymai opened a new pull request, #42279:
URL: https://github.com/apache/spark/pull/42279

   ### What changes were proposed in this pull request?
   
   Fix double encryption issue for migrated shuffle blocks
   
   Shuffle blocks upon migration are sent without decryption when io.encryption 
is enabled. The code on the receiving side ends up using serializer.wrapStream 
on the OutputStream to the file which results in the already encrypted bytes 
being encrypted again when the bytes are written out.
   
   This patch removes the usage of serializerManager.wrapStream on the 
receiving side and also adds tests that validate that this works as expected. I 
have also validated that the added tests will fail if the fix is not in place.
   
   Jira ticket with more details: 
https://issues.apache.org/jira/browse/SPARK-44588
   
   ### Why are the changes needed?
   
   Migrated shuffle blocks will be double encrypted when `spark.io.encryption = 
true` without this fix.
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   No
   
   
   ### How was this patch tested?
   
   Unit tests were added to test shuffle block migration with 
spark.io.encryption enabled and also fixes a test helper method to properly 
construct the SerializerManager with the encryption key.
   


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to