Github user juliuszsompolski commented on a diff in the pull request:
https://github.com/apache/spark/pull/19181#discussion_r141842730
--- Diff:
core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeInMemorySorter.java
---
@@ -162,14 +162,25 @@ private int getUsableCapacity() {
*/
public void free() {
if (consumer != null) {
- consumer.freeArray(array);
+ if (null != array) {
+ consumer.freeArray(array);
+ }
array = null;
}
}
public void reset() {
if (consumer != null) {
consumer.freeArray(array);
+ // this is needed to prevent a 'nested' spill,
--- End diff --
nit: it doesn't prevent a nested spill, it only renders it harmless
remove this line - the rest of the comment is true.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]