Skip to content

Commit

Permalink
[SPARK-23310][CORE] Turn off read ahead input stream for unshafe shuf…
Browse files Browse the repository at this point in the history
…fle reader

To fix regression for TPC-DS queries

Author: Sital Kedia <[email protected]>

Closes #20492 from sitalkedia/turn_off_async_inputstream.
  • Loading branch information
Sital Kedia authored and sameeragarwal committed Feb 5, 2018
1 parent a6bf3db commit 03b7e12
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ public UnsafeSorterSpillReader(
SparkEnv.get() == null ? 0.5 :
SparkEnv.get().conf().getDouble("spark.unsafe.sorter.spill.read.ahead.fraction", 0.5);

// SPARK-23310: Disable read-ahead input stream, because it is causing lock contention and perf regression for
// TPC-DS queries.
final boolean readAheadEnabled = SparkEnv.get() != null &&
SparkEnv.get().conf().getBoolean("spark.unsafe.sorter.spill.read.ahead.enabled", true);
SparkEnv.get().conf().getBoolean("spark.unsafe.sorter.spill.read.ahead.enabled", false);

final InputStream bs =
new NioBufferedFileInputStream(file, (int) bufferSizeBytes);
Expand Down

0 comments on commit 03b7e12

Please sign in to comment.