ASF GitHub Bot commented on DRILL-6148:

Github user HanumathRao commented on a diff in the pull request:

    --- Diff: 
    @@ -59,6 +59,7 @@ public static void setup() throws Exception {
         ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher)
             .configProperty(ExecConstants.EXTERNAL_SORT_SPILL_THRESHOLD, 1) // 
             .configProperty(ExecConstants.EXTERNAL_SORT_SPILL_GROUP_SIZE, 1) 
// Unmanaged
    +        .configProperty(ExecConstants.EXTERNAL_SORT_MAX_MEMORY, 10 * 1024 
* 1024) //use less memory for sorting.
    --- End diff --
    @paul-rogers  I am sorry for not being clear in my previous reply. This 
query has only one sort and also one minor fragment. If we set 60MB as 
MAX_QUERY_MEMORY_PER_NODE_KEY, then the result of the computeOperatorMemory() 
is 60MB.
    However, as I said this memory is sufficient for the query to run 
successfully without spilling.
    Then I tried out setting MAX_QUERY_MEMORY_PER_NODE_KEY to as low as 10MB so 
that this query should spill and fail with an exception (for this testcase). 
But even after setting so low the output of the computeOperatorMemory is 40MB. 
This is because of the default value of MIN_MEMORY_PER_BUFFERED_OP is 40MB. 
Hence, 40MB is used by the sort to sort the rows. This memory is enough for the 
sort to successfully run without an exception.
    Thats when I used the setting EXTERNAL_SORT_MAX_MEMORY to set low values so 
that Sort for sure can spill and throw the exception which is being tested by 
this testcase.

> TestSortSpillWithException is sometimes failing.
> ------------------------------------------------
>                 Key: DRILL-6148
>                 URL: https://issues.apache.org/jira/browse/DRILL-6148
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Tools, Build & Test
>    Affects Versions: 1.12.0
>            Reporter: Hanumath Rao Maduri
>            Assignee: Hanumath Rao Maduri
>            Priority: Minor
>              Labels: ready-to-commit
>             Fix For: 1.13.0
> TestSortSpillWithException#testSpillLeakManaged is sometimes failing. However 
> for some reason this is being observed only in one of my branch. 
> TestSpillLeakManaged tests for leak when an exception is thrown during the 
> spilling of the rows in ExternalSort. In the test failure case it happens 
> that ExternalSort is able to sort the data with the given memory and not 
> spill at all. Hence the injection interruption path is not hit at all and 
> hence no exception is thrown.
> The test case should use drill.exec.sort.external.mem_limit to force it to 
> use as less memory as possible so as to test the case.

This message was sent by Atlassian JIRA

Reply via email to