https://github.com/apache/spark
Revision 9b2eedc5beb32e99eedbdca344278243531b1c52 authored by Ross Lodge on 06 February 2019, 16:43:40 UTC, committed by Sean Owen on 06 February 2019, 16:44:25 UTC
## What changes were proposed in this pull request?

SPARK-23991 introduced a bug in `ReceivedBlockTracker#allocateBlocksToBatch`: when a queue with more than a few thousand blocks are in the queue, serializing the queue throws a StackOverflowError.  This change just adds `dequeueAll` to the new `clone` operation on the queue so that the fix in 23991 is preserved but the serialized data comes from an ArrayBuffer which doesn't have the serialization problems that mutable.Queue has.

## How was this patch tested?

A unit test was added.

Closes #23716 from rlodge/SPARK-26734.

Authored-by: Ross Lodge <rlodge@concentricsky.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
(cherry picked from commit 8427e9ba5cae28233d1bdc54208b46889b83a821)
Signed-off-by: Sean Owen <sean.owen@databricks.com>
1 parent 570edc6
History
Tip revision: 9b2eedc5beb32e99eedbdca344278243531b1c52 authored by Ross Lodge on 06 February 2019, 16:43:40 UTC
[SPARK-26734][STREAMING] Fix StackOverflowError with large block queue
Tip revision: 9b2eedc

README.md

back to top