[JBoss JIRA] (TEIID-4768) Clarify Caching guide using external materializaion
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4768?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-4768:
-------------------------------------
There is no 5 minute minimum. When there is error with either source databases or target materialization database (as in they are down and not available), the retry logic has time calculation like below to schedule the next run
{code}
MATH.min(ttl/4, 60000)
{code}
So, if TTL was 30 secs, then every 7.5 seconds it will retry. Each time it retries it sets the {{Status}} table to "LOADING", then when it fails then it flips back to "FAILED_LOAD". Now depending upon, if view tables's source database is down, then materialization process fails immediately, that means the {{Status}} could see "FAILED_LOAD" for 7.5 secs before flipped back to "LOADING". If target database is down, then process fails when the materialization process starts writing results to the target database. That means the "LOADING" will appear for amount of time look to write first row to the target database, which can be long time based on view, then when it fails, it flips back to "FAILED_LOAD" for 7.5 seconds before retrying. For user who is monitoring the {{Status}} table manually, this could appear that the {{Status}} table is struck at "LOADING", but in fact that is not the case. See more investigation in TEIID-4758.
My suggestion to [~van.halbert] was to use a large enough TTL where he has time to manually verify.
> Clarify Caching guide using external materializaion
> ---------------------------------------------------
>
> Key: TEIID-4768
> URL: https://issues.jboss.org/browse/TEIID-4768
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Affects Versions: 9.3
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Priority: Critical
>
> The caching guide section that relates to external materialization needs to add the following information for clarity:
> - the TTL needs to be set at a minimum of 5 minutes (300000) so in cases where the status gets hung at "LOADING" (i.e., the target cache goes down during materialization), the materialization process will recover and restart the loading.
> - add a status table "Status" matrix:
> LOADED - means the cache was loaded
> LOADING - means cache is in the process of loading
> FAILED_LOAD - means an error occurred during the load process
> ...
> and these should correlate to the section that describes the process in detail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4619) left join returns wrong results
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4619?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4619:
---------------------------------------
So more than likely this was resolved by TEIID-4129. Do you mind if this is resolved with a reference to that issue?
> left join returns wrong results
> -------------------------------
>
> Key: TEIID-4619
> URL: https://issues.jboss.org/browse/TEIID-4619
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 9.0.4, 9.0.5
> Reporter: Bram Gadeyne
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 9.2.1
>
> Attachments: correct_result.txt, enclosed_queryplan.txt, query1_enclosed_plan.txt, query1_plan.txt, query2_plan.txt, teiid_reduced_case.txt, wrong_result.txt
>
>
> I have the following situation.
> I have a temporary table #tmp_admissions that contains 8047 rows.
> In this first query there are 66290 results. However if I only look at the lines for infectionid 880 then there are only 16 lines.
> {code:sql}
> select l.infectionid, l.id as linkid, lc.linkcultureid, lc.responsibleculture, lc.culturealternative, cl.sampleinsertts, cl.specimennumber,
> cl.culturenumber, cl.culturename, cl.quotation, ls.material, ls.sampletime,
> abr.culturenumber as abgram_culturenumber,abr.antibiogrampart, abr.resisttype,
> lc.antibiogramculturenr,lc.antibiogramspecimennr,lc.antibiogramsampleinsertts
> from #tmp_admissions adm
> join cos2_links l on l.admissionid = cast(adm.patientid as string)
> join cos2_link_culture lc on lc.linkid = l.id
> left join cos2_lab_culture cl on cl.culturenumber = lc.culturenr and cl.specimennumber = lc.culturespecimennr and cl.sampleinsertts = lc.culturesampleinsertts
> left join cos2_lab_sample ls on ls.inserttime = cl.sampleinsertts and ls.specimennumber = cl.specimennumber
> left join cos2_antibiogramresistences abr on abr.specimennumber = cl.specimennumber and abr.culturenumber = cl.culturenumber and abr.sampleinsertts = cl.sampleinsertts
> {code}
> This query does almost the same but returns 30 rows (and is correct).
> {code:sql}
> select l.infectionid, l.id as linkid, lc.linkcultureid, lc.responsibleculture, lc.culturealternative, cl.sampleinsertts, cl.specimennumber,
> cl.culturenumber, cl.culturename, cl.quotation, ls.material, ls.sampletime,
> abr.culturenumber as abgram_culturenumber,abr.antibiogrampart, abr.resisttype,
> lc.antibiogramculturenr,lc.antibiogramspecimennr,lc.antibiogramsampleinsertts
> from cos2_links l
> join cos2_link_culture lc on lc.linkid = l.id
> left join cos2_lab_culture cl on cl.culturenumber = lc.culturenr and cl.specimennumber = lc.culturespecimennr and cl.sampleinsertts = lc.culturesampleinsertts
> left join cos2_lab_sample ls on ls.inserttime = cl.sampleinsertts and ls.specimennumber = cl.specimennumber
> left join cos2_antibiogramresistences abr on abr.specimennumber = cl.specimennumber and abr.culturenumber = cl.culturenumber and abr.sampleinsertts = cl.sampleinsertts
> where l.infectionid = 880
> {code}
> cos2_link_culture contains 2 rows for this infectionid. The left join statements should result in 15 rows for both rows. However the left join results in the first query for the first row are null and to my understanding ignored. I'll attach the query plans for both queries.
> I should note that there is a one to many relation between infection and admission so therefore infectionid is for the same admission.
> Strangely enough if you enclode the first query in a group by query and count the rows it does indeed return 2 times 15 for the specific groups (see enclosed_queryplan.txt).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4768) Clarify Caching guide using external materializaion
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4768?page=com.atlassian.jira.plugin... ]
Steven Hawkins reassigned TEIID-4768:
-------------------------------------
Assignee: Ramesh Reddy (was: Steven Hawkins)
> the TTL needs to be set at a minimum of 5 minutes
I'm not aware of why 5 minutes is a special value. Can you elaborate?
> Clarify Caching guide using external materializaion
> ---------------------------------------------------
>
> Key: TEIID-4768
> URL: https://issues.jboss.org/browse/TEIID-4768
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Affects Versions: 9.3
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Priority: Critical
>
> The caching guide section that relates to external materialization needs to add the following information for clarity:
> - the TTL needs to be set at a minimum of 5 minutes (300000) so in cases where the status gets hung at "LOADING" (i.e., the target cache goes down during materialization), the materialization process will recover and restart the loading.
> - add a status table "Status" matrix:
> LOADED - means the cache was loaded
> LOADING - means cache is in the process of loading
> FAILED_LOAD - means an error occurred during the load process
> ...
> and these should correlate to the section that describes the process in detail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4768) Clarify Caching guide using external materializaion
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4768?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4768:
------------------------------------
When there are multiple Teiid servers in a cluster, there are checks to help ensure only one node is performing the load.
> Clarify Caching guide using external materializaion
> ---------------------------------------------------
>
> Key: TEIID-4768
> URL: https://issues.jboss.org/browse/TEIID-4768
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Affects Versions: 9.3
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Priority: Critical
>
> The caching guide section that relates to external materialization needs to add the following information for clarity:
> - the TTL needs to be set at a minimum of 5 minutes (300000) so in cases where the status gets hung at "LOADING" (i.e., the target cache goes down during materialization), the materialization process will recover and restart the loading.
> - add a status table "Status" matrix:
> LOADED - means the cache was loaded
> LOADING - means cache is in the process of loading
> FAILED_LOAD - means an error occurred during the load process
> ...
> and these should correlate to the section that describes the process in detail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4768) Clarify Caching guide using external materializaion
by Van Halbert (JIRA)
Van Halbert created TEIID-4768:
----------------------------------
Summary: Clarify Caching guide using external materializaion
Key: TEIID-4768
URL: https://issues.jboss.org/browse/TEIID-4768
Project: Teiid
Issue Type: Enhancement
Components: Documentation
Affects Versions: 9.3
Reporter: Van Halbert
Assignee: Steven Hawkins
Priority: Critical
The caching guide section that relates to external materialization needs to add the following information for clarity:
- the TTL needs to be set at a minimum of 5 minutes (300000) so in cases where the status gets hung at "LOADING" (i.e., the target cache goes down during materialization), the materialization process will recover and restart the loading.
- add a status table "Status" matrix:
LOADED - means the cache was loaded
LOADING - means cache is in the process of loading
FAILED_LOAD - means an error occurred during the load process
...
and these should correlate to the section that describes the process in detail.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4764) When using importer.tableTypes, Teiid will not create the status table
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4764?page=com.atlassian.jira.plugin... ]
Van Halbert edited comment on TEIID-4764 at 2/15/17 10:04 AM:
--------------------------------------------------------------
Attached vdb, the Example model is where the status table is
{code}
<model name="Example">
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.widenUnsignedTypes" value="false"/>
<source name="postgresql-connector" translator-name="translator-postgresql" connection-jndi-name="java:jboss/datasources/TestDB"/>
</model>
{code}
13
was (Author: van.halbert):
Attached vdb, the Example model is where the status table is
<model name="Example">
8 <property name="importer.tableTypes" value="TABLE,VIEW"/>
9 <property name="importer.useFullSchemaName" value="false"/>
10 <property name="importer.widenUnsignedTypes" value="false"/>
11 <source name="postgresql-connector" translator-name="translator-postgresql" connection-jndi-name="java:jboss/datasources/TestDB"/>
12 </model>
13
> When using importer.tableTypes, Teiid will not create the status table
> ----------------------------------------------------------------------
>
> Key: TEIID-4764
> URL: https://issues.jboss.org/browse/TEIID-4764
> Project: Teiid
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.12.9.6_3
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: test-materialized-vdb.xml
>
>
> When using importer.tableTypes, Teiid will not create the status table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months
[JBoss JIRA] (TEIID-4764) When using importer.tableTypes, Teiid will not create the status table
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4764?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4764:
------------------------------------
Attached vdb, the Example model is where the status table is
<model name="Example">
8 <property name="importer.tableTypes" value="TABLE,VIEW"/>
9 <property name="importer.useFullSchemaName" value="false"/>
10 <property name="importer.widenUnsignedTypes" value="false"/>
11 <source name="postgresql-connector" translator-name="translator-postgresql" connection-jndi-name="java:jboss/datasources/TestDB"/>
12 </model>
13
> When using importer.tableTypes, Teiid will not create the status table
> ----------------------------------------------------------------------
>
> Key: TEIID-4764
> URL: https://issues.jboss.org/browse/TEIID-4764
> Project: Teiid
> Issue Type: Bug
> Components: Server
> Affects Versions: 8.12.9.6_3
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Attachments: test-materialized-vdb.xml
>
>
> When using importer.tableTypes, Teiid will not create the status table.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 11 months