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.