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

   ### 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.wrapForEncryption 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.wrapForEncryption 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.
   
   
   ### 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 explicitly enable spark.io.encryption and to also 
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: [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]

Reply via email to