Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-2757 Verify operators correctly handle low memory conditions and cancellations
  3. DRILL-2947

AllocationHelper.allocateNew() doesn't have a consistent behavior when it can't allocate

    XMLWordPrintableJSON

Details

    Description

      AllocationHelper.allocateNew(...) has the following implementation:

      public static boolean allocateNew(ValueVector v, int valueCount){
          if (v instanceof  FixedWidthVector) {
            ((FixedWidthVector) v).allocateNew(valueCount);
            return true;
          } else {
            return v.allocateNewSafe();
          }
        }
      

      If it can't allocate the memory it will either return false or throw an OutOfMemoryRuntimeException depending on the class of v.

      Some operators that use this method, like NestedLoopJoinBatch don't check if allocateNew() returns false assuming it will throw an exception instead.

      Attachments

        Issue Links

          Activity

            People

              sphillips Steven Phillips
              adeneche Abdel Hakim Deneche
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: