Github user davies commented on a diff in the pull request:
https://github.com/apache/spark/pull/2259#discussion_r17271207
--- Diff: python/pyspark/worker.py ---
@@ -69,8 +69,12 @@ def main(infile, outfile):
ser = CompressedSerializer(pickleSer)
for _ in range(num_broadcast_variables):
bid = read_long(infile)
- value = ser._read_with_length(infile)
- _broadcastRegistry[bid] = Broadcast(bid, value)
+ if bid >= 0:
+ value = ser._read_with_length(infile)
+ _broadcastRegistry[bid] = Broadcast(bid, value)
+ else:
+ bid = - bid - 1
+ _broadcastRegistry.pop(bid, None)
--- End diff --
Yes, we will always send valid bids. This is for cases that
_broadcastRegistry was cleared by others, it's not necessary.
Do we need to change this to `remove(bid)` for readability?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]