-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-26201] Fix python broadcast with encryption #23166
Closed
Closed
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just want to make sure I understand this part -- this change isn't necessary, right? even in the old version,
path
gets updated here, sosetupDecryptionServer
would know where to read the data from.that said, I do think your change makes more sense -- not sure why I didn't just use the supplied path in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the old version, we generated a random path with encryption turned off, so with encryption off it reads and writes from random path. When encryption related code was written we introduced a new "broadcast" path, the problem is when we tried to decrypt it on the driver side, it looks at the random path reference lying around and tries to decrypt from it but the actual data is in the new "broadcast" path location. So, by just passing the random path generated reference, we make sure all the places are in sync with and without encryption. (
spark/python/pyspark/broadcast.py
Line 78 in 001dfff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I see how it was wrong before. I'm saying, after you add
setupDecryptionServer
, then that decryption server would still be reading from the value ofpath
which gets updated here, since its the same object in the driver's JVM.anyway, this isn't a big deal, I think its better with your change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok I think we agree its good this way, (just to verify though I won't commit until you +1 it), but yes you are correct, now that we are using the decryption server which reads from the path in PythonBroadcast the path change isn't strictly necessary, but the value of self._path in broadcast.py doesn't match the path in PythonBroadcast so I think its better to have those match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes +1. Sorry didn't mean to get things stuck on this, just wanted to make sure I was actually following what was happening correctly.