[ https://issues.apache.org/jira/browse/DRILL-5854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Padma Penumarthy updated DRILL-5854: ------------------------------------ Description: When we get a batch with record count 0 and valid schema, the following exception is thrown sometimes. Problem seem to be that merge receiver is reading from the wrong sender when an empty batch is received. Error: SYSTEM ERROR: IllegalStateException: Cleanup before finished. 0 out of 1 streams have finished Fragment 0:0 [Error Id: 0dec4617-eb06-48fd-80c9-75e9c1e74ce2 on sidrill1:31010] (java.lang.IllegalStateException) Cleanup before finished. 0 out of 1 streams have finished org.apache.drill.exec.work.batch.BaseRawBatchBuffer.close():107 org.apache.drill.common.AutoCloseables.close():76 org.apache.drill.common.AutoCloseables.close():64 org.apache.drill.exec.work.batch.AbstractDataCollector.close():119 org.apache.drill.common.AutoCloseables.close():76 org.apache.drill.exec.work.batch.IncomingBuffers.close():140 org.apache.drill.exec.ops.FragmentContext.suppressingClose():436 org.apache.drill.exec.ops.FragmentContext.close():429 org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources():320 org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup():155 org.apache.drill.exec.work.fragment.FragmentExecutor.run():264 org.apache.drill.common.SelfCleaningRunnable.run():38 java.util.concurrent.ThreadPoolExecutor.runWorker():1149 java.util.concurrent.ThreadPoolExecutor$Worker.run():624 java.lang.Thread.run():748 (state=,code=0) was: When we get a batch with record count 0 and valid schema, the following exception is thrown sometimes. Problem seem to be that downstream operators are not getting NONE after OK_NEW_SCHEMA with record count 0. Error: SYSTEM ERROR: IllegalStateException: Cleanup before finished. 0 out of 1 streams have finished Fragment 0:0 [Error Id: 0dec4617-eb06-48fd-80c9-75e9c1e74ce2 on sidrill1:31010] (java.lang.IllegalStateException) Cleanup before finished. 0 out of 1 streams have finished org.apache.drill.exec.work.batch.BaseRawBatchBuffer.close():107 org.apache.drill.common.AutoCloseables.close():76 org.apache.drill.common.AutoCloseables.close():64 org.apache.drill.exec.work.batch.AbstractDataCollector.close():119 org.apache.drill.common.AutoCloseables.close():76 org.apache.drill.exec.work.batch.IncomingBuffers.close():140 org.apache.drill.exec.ops.FragmentContext.suppressingClose():436 org.apache.drill.exec.ops.FragmentContext.close():429 org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources():320 org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup():155 org.apache.drill.exec.work.fragment.FragmentExecutor.run():264 org.apache.drill.common.SelfCleaningRunnable.run():38 java.util.concurrent.ThreadPoolExecutor.runWorker():1149 java.util.concurrent.ThreadPoolExecutor$Worker.run():624 java.lang.Thread.run():748 (state=,code=0) > IllegalStateException when empty batch with valid schema is received. > --------------------------------------------------------------------- > > Key: DRILL-5854 > URL: https://issues.apache.org/jira/browse/DRILL-5854 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Flow > Affects Versions: 1.11.0 > Reporter: Padma Penumarthy > Assignee: Padma Penumarthy > Fix For: 1.12.0 > > > When we get a batch with record count 0 and valid schema, the following > exception is thrown sometimes. > Problem seem to be that merge receiver is reading from the wrong sender when > an empty batch is received. > Error: SYSTEM ERROR: IllegalStateException: Cleanup before finished. 0 out of > 1 streams have finished > Fragment 0:0 > [Error Id: 0dec4617-eb06-48fd-80c9-75e9c1e74ce2 on sidrill1:31010] > (java.lang.IllegalStateException) Cleanup before finished. 0 out of 1 > streams have finished > org.apache.drill.exec.work.batch.BaseRawBatchBuffer.close():107 > org.apache.drill.common.AutoCloseables.close():76 > org.apache.drill.common.AutoCloseables.close():64 > org.apache.drill.exec.work.batch.AbstractDataCollector.close():119 > org.apache.drill.common.AutoCloseables.close():76 > org.apache.drill.exec.work.batch.IncomingBuffers.close():140 > org.apache.drill.exec.ops.FragmentContext.suppressingClose():436 > org.apache.drill.exec.ops.FragmentContext.close():429 > > org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources():320 > org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup():155 > org.apache.drill.exec.work.fragment.FragmentExecutor.run():264 > org.apache.drill.common.SelfCleaningRunnable.run():38 > java.util.concurrent.ThreadPoolExecutor.runWorker():1149 > java.util.concurrent.ThreadPoolExecutor$Worker.run():624 > java.lang.Thread.run():748 (state=,code=0) -- This message was sent by Atlassian JIRA (v6.4.14#64029)