Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5265

AssertionError: Batch not found in storage

    XMLWordPrintable

Details

    Description

      While executing the following query:

      insert into rep149_cci(PatientID,age,Orig,Upd,agepointsO,agepointsU,AMI,CHF,PVD,CVD,DEM,CPD,PUD,MLD,SLD,DNC,DWC,HEM,RED,MAL,MST,HIV)
      select cci.patientid as patientid,cci.age as age,cci.orig as orig,cci.upd as upd,cci.agepointso as agepointso,cci.agepointsu as agepointsu,
      	cci.charlson_ami as ami,cci.charlson_chf as chf,cci.charlson_pvd as pvd,cci.charlson_cvd as cvd,cci.charlson_dem as dem,cci.charlson_cpd as cpd,cci.charlson_pud as pud,
      	cci.charlson_mld as mld,cci.charlson_sld as sld,cci.charlson_dnc as dnc,cci.charlson_dwc as dwc,cci.charlson_hem as hem,cci.charlson_red as red,cci.charlson_mal as mal,
      	cci.charlson_mst as mst,cci.charlson_hiv as hiv
      from rep149_cohort gd
      join izisviews.pr_calculate_cci cci on
       cci.patientid_in = gd.patientid;
      

      rep149_cci is defined as

      create foreign temporary table rep149_cci(
      	PatientID	integer not null,
      	age	bigdecimal,
      	Orig	long,
      	Upd	long,
      	agepointsO	integer,
      	agepointsU	integer,
      	AMI	integer,
      	CHF	integer,
      	PVD	integer,
      	CVD	integer,
      	DEM	integer,
      	CPD	integer,
      	PUD	integer,
      	MLD	integer,
      	SLD	integer,
      	DNC	integer,
      	DWC	integer,
      	HEM	integer,
      	RED	integer,
      	MAL	integer,
      	MST	integer,
      	HIV	integer,
      	primary key(patientid)
      )OPTIONS (UPDATABLE true) on tmptables;
      

      pr_calculate_cci is a virtual procedure. (I can't however share this code for confidentiality reasons).

      CREATE VIRTUAL PROCEDURE pr_calculate_cci(patientid_in integer)
      RETURNS (
      	PatientID		integer,
      	age				bigdecimal,
      	Orig			long,
      	Upd				long,
      	agepointsO		integer,
      	agepointsU		integer,
      	AMI				integer,
      	CHF				integer,
      	PherVascDis		integer,
      	CerebVascDis	integer,
      	Dement			integer,
      	ChrPulmDis		integer,
      	PeptUlcer		integer,
      	MildLivDis		integer,
      	SevLivDis		integer,
      	DiabetesNoCompl	integer,
      	DiabetesWithCompl	integer,
      	HemiPara		integer,
      	RenalDis		integer,
      	Malign			integer,
      	Metastase		integer,
      	HIV_AIDS		integer
      )
      AS
      BEGIN
      ...
      END
      

      There are a few error reports like this one:
      2018-02-23 08:33:05,478 ERROR [org.teiid.BUFFER_MGR] (Worker291_QueryProcessorQueue571476) mh0bsTIbs7qY TEIID30001 Max block number exceeded by object 1,366,497 from group 5,068,016. It is a Batch of 1797 rows of [Ljava.lang.String;@10953478. The estimated size was 172,528, but the actual size was 14,410. Increase the maxStorageObjectSize to support larger storage objects. Alternatively you could make the processor batch size smaller.

      The final stack trace is:
      2018-02-23 08:33:05,539 ERROR [org.teiid.PROCESSOR] (Worker291_QueryProcessorQueue571476) mh0bsTIbs7qY TEIID30019 Unexpected exception for request mh0bsTIbs7qY.90: java.lang.AssertionError: Batch not found in storage 5067771
      at org.teiid.common.buffer.impl.BufferManagerImpl$BatchManagerImpl.getBatch(BufferManagerImpl.java:382)
      at org.teiid.common.buffer.SPage.getValues(SPage.java:234)
      at org.teiid.common.buffer.SPage.search(SPage.java:135)
      at org.teiid.common.buffer.STree.find(STree.java:247)
      at org.teiid.common.buffer.STree.insert(STree.java:295)
      at org.teiid.query.processor.relational.WindowFunctionProjectNode.saveValues(WindowFunctionProjectNode.java:419)
      at org.teiid.query.processor.relational.WindowFunctionProjectNode.buildResults(WindowFunctionProjectNode.java:380)
      at org.teiid.query.processor.relational.WindowFunctionProjectNode.nextBatchDirect(WindowFunctionProjectNode.java:229)
      at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
      at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
      at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
      at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirectInternal(UnionAllNode.java:165)
      at org.teiid.query.processor.relational.UnionAllNode.nextBatchDirect(UnionAllNode.java:138)
      at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
      at org.teiid.query.processor.relational.SelectNode.nextBatchDirect(SelectNode.java:100)
      at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
      at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
      at org.teiid.query.processor.relational.SourceState.prefetch(SourceState.java:207)
      at org.teiid.query.processor.relational.SourceState.rowCountLE(SourceState.java:154)

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-shawkins Steven Hawkins
              gadeynebram Bram Gadeyne (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: