Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5104

Foreman sets external sort memory allocation even for a physical plan

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 1.8.0
    • None
    • None
    • None

    Description

      Consider the (disabled) unit test TestSimpleExternalSort.outOfMemoryExternalSort which uses the physical plan xsort/oom_sort_test.json that contains a setting for the amount of memory to allocate:

             {
                  ...
                  pop:"external-sort",
                  ...
                  initialAllocation: 1000000,
                  maxAllocation: 30000000
              },
      

      When run, the amount of memory is set to 715827882. The reason is that code was added to Foreman to compute the memory to allocate to the external sort:

        private void runPhysicalPlan(final PhysicalPlan plan) throws ExecutionSetupException {
          validatePlan(plan);
          MemoryAllocationUtilities.setupSortMemoryAllocations(plan, queryContext);
      

      The problem is that a physical plan should execute as provided to enable detailed testing.

      To solve this problem, move the sort memory setup to the path taken by SQL queries, but not via physical plans.

      This change is necessary to re-enable the previously-disabled external sort tests.

      Attachments

        1. physical.json
          5 kB
          Rahul Kumar Challapalli
        2. 2711af55-e1f7-bf4e-3dcf-b9f66f69fc33.sys.drill
          9 kB
          Rahul Kumar Challapalli

        Activity

          People

            paul-rogers Paul Rogers
            paul-rogers Paul Rogers
            Rahul Kumar Challapalli Rahul Kumar Challapalli
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: