apache / drill

Apache Drill is a distributed MPP query layer for self describing data
https://drill.apache.org/
Apache License 2.0
1.92k stars 985 forks source link

DRILL-8488: HashJoinPOP memory leak is caused by OutOfMemoryException #2900

Closed shfshihuafeng closed 2 months ago

shfshihuafeng commented 2 months ago

DRILL-8488: HashJoinPOP memory leak is caused by OutOfMemoryException

(Please replace PR Title with actual PR Title)

Description

We should catch the OutOfMemoryException instead of OutOfMemoryError, see buffer method for allacate memory

 public DrillBuf buffer(final int initialRequestSize, BufferManager manager) {
    if (!outcome.isOk()) {
      throw new OutOfMemoryException**(createErrorMsg(this, actualRequestSize, initialRequestSize));
    }
}

Documentation

(Please describe user-visible changes similar to what should appear in the Drill documentation.)

Testing

drill-8485