[JBoss JIRA] (TEIID-5091) EdmPrimitiveTypeException in OData4 parse results
by Berenger Robin (JIRA)
[ https://issues.jboss.org/browse/TEIID-5091?page=com.atlassian.jira.plugin... ]
Berenger Robin commented on TEIID-5091:
---------------------------------------
Hi,
I have the same problem with teiid 9.0.6, does this fix also working on this version?
Thanks.
> EdmPrimitiveTypeException in OData4 parse results
> -------------------------------------------------
>
> Key: TEIID-5091
> URL: https://issues.jboss.org/browse/TEIID-5091
> Project: Teiid
> Issue Type: Quality Risk
> Components: OData
> Affects Versions: 8.12.5
> Environment: * JDV 6.3
> Reporter: Kylin Soong
> Assignee: Steven Hawkins
>
> Decimal type has risk if use odata4 to query data, I would use below example to show how to reproduce the errot:
> h3. set up sample data in mysql
> {code}
> create table test(U_ID Decimal Primary Key);
> insert into test values(11);
> desc test;
> +-------+---------------+------+-----+---------+-------+
> | Field | Type | Null | Key | Default | Extra |
> +-------+---------------+------+-----+---------+-------+
> | U_ID | decimal(10,0) | NO | PRI | NULL | |
> +-------+---------------+------+-----+---------+-------+
> {code}
> h3. Deploy VDB
> The VDB only contain one source model
> {code}
> <model name="TEST">
> <property name="importer.useFullSchemaName" value="false"/>
> <source name="mysql-connector" translator-name="translator-mysql5" connection-jndi-name="java:/TEST_DS"/>
> </model>
> {code}
> h3. Reproduce
> Once the vdb deployed finished, the http://localhost:8080/odata4/TEST_VDB/TEST/test will return below error in web browswer
> {code}
> <error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
> <code>null</code>
> <message>
> org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
> </message>
> </error>
> {code}
> The server log have a error like
> {code}
> 15:47:05,306 ERROR [org.teiid.ODATA] (http-0.0.0.0:8180-3) TEIID16050 Unable to process odata request due to: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints. with cause The value '11' does not match the facets' constraints.: org.apache.olingo.server.api.ODataApplicationException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
> at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:174) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.execute(DataRequest.java:332)
> at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:255)
> at org.apache.olingo.server.core.ServiceDispatcher.internalExecute(ServiceDispatcher.java:160)
> at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:98)
> at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:66)
> at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:43) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:231) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
> Caused by: java.sql.SQLException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
> at org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:275) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.olingo.service.EntityCollectionResponse.isSameEntity(EntityCollectionResponse.java:151) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.olingo.service.LocalClient.executeSQL(LocalClient.java:280) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.olingo.service.TeiidServiceHandler.executeQuery(TeiidServiceHandler.java:349) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:172) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 25 more
> Caused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
> at org.apache.olingo.commons.core.edm.primitivetype.EdmDecimal.internalValueToString(EdmDecimal.java:185)
> at org.apache.olingo.commons.core.edm.primitivetype.AbstractPrimitiveType.valueToString(AbstractPrimitiveType.java:86)
> at org.apache.olingo.server.core.responses.EntityResponse.buildLocation(EntityResponse.java:200)
> at org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:247) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
> ... 29 more
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-5270:
------------------------------------
The problem with hotrod client listener events, you only get the even when its done. Not like when using library mode, the pre-event is also sent, so that you can track what hasn't completed. In order to do this with the hotrod client, will need to track every put (related to materialization) by key and then confirm there's a corresponding clientlistener event. And until all put's have a corresponding event, it will be assumed the cache is still in the process of committing those changes. And once all put's can be accounted for, then the rename can be triggered.
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-4278) MySQL 5 should support distinct aggregates
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4278?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4278:
---------------------------------------
1) regardless of the translator, the rewrite removes distinct from min/max as it has no effect on the results.
2) the mapping to group_concat has not been added regardless of distinct behavior. One small consideration there is that Teiid supports blob/clob results, but group_concat returns strings.
> MySQL 5 should support distinct aggregates
> ------------------------------------------
>
> Key: TEIID-4278
> URL: https://issues.jboss.org/browse/TEIID-4278
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.7.8.6_2, 8.12.6.6_3
>
>
> Older versions of mysql only supported distinct count, but later versions supported distinct with all relevant aggregates.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-4278) MySQL 5 should support distinct aggregates
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4278?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-4278:
------------------------------------
[~shawkins]
# As per (1) both MIN and MAX DISTINCT are supported in MySQL. Teiid is not pushing these down (tried on 8.12.12.6_4).
(1) https://dev.mysql.com/doc/refman/5.5/en/group-by-functions.html
Is that an omission, or Teiid relies on the MySQL docs' statement:
bq. The DISTINCT keyword can be used to find the minimum of the distinct values of expr, however, this produces the same result as omitting DISTINCT.
# STRING_AGG could be pushed as GROUP_CONCAT, but it isn't.
Thus the exhaustive list of distinct aggregates being pushed down is:
* AVG
* COUNT
* SUM
Or is there something more?
> MySQL 5 should support distinct aggregates
> ------------------------------------------
>
> Key: TEIID-4278
> URL: https://issues.jboss.org/browse/TEIID-4278
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.1, 8.7.8.6_2, 8.12.6.6_3
>
>
> Older versions of mysql only supported distinct count, but later versions supported distinct with all relevant aggregates.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-5270:
------------------------------------
Add the listener to check for the begin of the action and then confirm that its completed. If there are actions that have not been completed, the triggering of the rename can wait till all beginning actions have a completed action.
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-5270:
------------------------------------
When adding (putting) into the cache, there is no synchronous processing by the hotrod client. That is the issue. You can do put/putall/putAsync, but the it doesn't do any of it synchronously. We know when Teiid is done processing, by when it triggers the post step of triggering the native call. Its in the native call that it will need to check that the listener has completed all inserts.
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert updated TEIID-5270:
-------------------------------
Comment: was deleted
(was: When adding (putting) into the cache, there is no synchronous processing by the hotrod client. That is the issue. You can do put/putall/putAsync, but the it doesn't do any of it synchronously. And because its being processed in batches, there is no knowledge of when the last batch of inserts is done. So tell how to determine when Teiid is done with its inserts so that the rename can be done?
)
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-5270:
------------------------------------
When adding (putting) into the cache, there is no synchronous processing by the hotrod client. That is the issue. You can do put/putall/putAsync, but the it doesn't do any of it synchronously. And because its being processed in batches, there is no knowledge of when the last batch of inserts is done. So tell how to determine when Teiid is done with its inserts so that the rename can be done?
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (TEIID-5270) Materialization translator infinispan-hotrod inconsistent state
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5270?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5270:
-------------------------------------
I feel that depending on timouts not reliable completely. Is there synchronous "put" or "putAll? this could be slow but that would be the right option. It should not matter as this is materialization load which is happening in the background and will not affect any user queries for performance, just your materialization loads will be little longer.
> Materialization translator infinispan-hotrod inconsistent state
> ---------------------------------------------------------------
>
> Key: TEIID-5270
> URL: https://issues.jboss.org/browse/TEIID-5270
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.12.6_4
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> There is an inconsistency between contents of status table and jdg cache when using infinispan-hotrod translator for materialization.
> For a vdb:
> {code:xml}
> <vdb name="teiid5259" version="1">
> <model name="source">
> <source connection-jndi-name="java:/jdg71HotrodDS" name="source"
> translator-name="tr-override" />
> <metadata type="DDL">
> <![CDATA[
> CREATE FOREIGN TABLE a(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${primary.cache.name}');
> CREATE FOREIGN TABLE a_stage(id integer NOT NULL PRIMARY KEY) OPTIONS (UPDATABLE TRUE, "teiid_ispn:cache" '${staging.cache.name}');
> ]]>
> </metadata>
> <metadata type="NATIVE" />
> </model>
> <model name="h2Source">
> <source name="h2Source" translator-name="h2" connection-jndi-name="java:/h2-localhost-9292-ds" />
> </model>
> <model name="View" type="VIRTUAL">
> <metadata type="DDL"><![CDATA[
> CREATE VIEW mat_a(
> id integer NOT NULL
> ) OPTIONS (MATERIALIZED 'TRUE',
> MATERIALIZED_TABLE 'source.a',
> "teiid_rel:MATERIALIZED_STAGE_TABLE" 'source.a_stage',
> "teiid_rel:ALLOW_MATVIEW_MANAGEMENT" 'true',
> "teiid_rel:MATVIEW_STATUS_TABLE" 'h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE',
> "teiid_rel:MATVIEW_AFTER_LOAD_SCRIPT" 'execute source.native(''rename source.a_stage source.a'');',
> "teiid_rel:MATVIEW_BEFORE_LOAD_SCRIPT" 'execute source.native(''truncate source.a_stage'');',
> "teiid_rel:MATVIEW_ONERROR_ACTION" 'THROW_EXCEPTION',
> "teiid_rel:MATVIEW_TTL" 10000
> )
> AS SELECT 1 UNION ALL SELECT 2;
> ]]>
> </metadata>
> </model>
> <translator name="tr-override" type="infinispan-hotrod">
> <property name="SupportsDirectQueryProcedure" value="true"/>
> </translator>
> </vdb>
> {code}
> I can reach a state when:
> # The status table states LOADED for the view
> # The DATA SRC commands inserting into JDG ended (according to teiid-command log)
> # But consecutive query against the view returns lower count (even though having THROW_EXCEPTION in ONERROR_ACTION property)
> See the attached command log:
> {code}
> 13:59:31,679 INFO [org.teiid.COMMAND_LOG] (Teiid Timer0) L8MeUp92Tess START USER COMMAND: startTime=2018-03-01 13:59:31.679 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess applicationName=internal principal=embedded-async vdbName=teiid5259 vdbVersion=1 sql=execute SYSADMIN.loadMatView('View','mat_a')
> 13:59:31,680 INFO [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue14) SBqGYWW07OB5 END USER COMMAND: endTime=2018-03-01 13:59:31.68 requestID=SBqGYWW07OB5.0 txID=null sessionID=SBqGYWW07OB5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=SELECT g_0.NAME, g_0.TARGETSCHEMANAME, g_0.TARGETNAME, g_0.VALID, g_0.LOADSTATE, g_0.UPDATED, g_0.CARDINALITY, g_0.LOADNUMBER FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:31,715 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue16) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.715 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[SELECT g_0."NAME", g_0."TARGETSCHEMANAME", g_0."TARGETNAME", g_0."VALID", g_0."LOADSTATE", g_0."UPDATED", g_0."CARDINALITY", g_0."LOADNUMBER" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:31,716 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue17) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.716 requestID=L8MeUp92Tess.0 sourceCommandID=70 executionID=8 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1071137
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADING', valid = FALSE, Updated = {ts'2018-03-01 13:59:31.719'}, Cardinality = -1 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:31,725 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue18) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:31.725 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADING', "VALID" = 0, "UPDATED" = TIMESTAMP '2018-03-01 13:59:31.719', "CARDINALITY" = -1 WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:31,728 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:31.728 requestID=L8MeUp92Tess.0 sourceCommandID=71 executionID=9 txID=null modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=1169356
> 13:59:31,731 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.731 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('truncate source.a_stage')
> 13:59:31,845 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:31.845 requestID=uaySHcXyc0o5.0 sourceCommandID=74 executionID=6 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=3558736
> 13:59:31,847 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:31.847 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:32,040 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.04 requestID=L8MeUp92Tess.0 sourceCommandID=73 executionID=10 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=1493046
> 13:59:32,047 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.047 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (1)
> 13:59:32,460 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:32.46 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=12 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4783162
> 13:59:32,462 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.462 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=INSERT INTO source.a_stage (id) VALUES (2)
> 13:59:32,753 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.753 requestID=uaySHcXyc0o5.0 sourceCommandID=79 executionID=11 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=0 cpuTime(ns)=5021072
> 13:59:32,800 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 START DATA SRC COMMAND: startTime=2018-03-01 13:59:32.8 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 1, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:32.756'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 1)
> 13:59:32,801 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 SOURCE SRC COMMAND: endTime=2018-03-01 13:59:32.801 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 1, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:32.756', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 1]
> 13:59:32,804 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END SRC COMMAND: endTime=2018-03-01 13:59:32.804 requestID=uaySHcXyc0o5.0 sourceCommandID=80 executionID=14 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:e status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=uaySHcXyc0o5 principal=embedded-async finalRowCount=1 cpuTime(ns)=31050942
> 13:59:32,806 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue11) uaySHcXyc0o5 END USER COMMAND: endTime=2018-03-01 13:59:32.806 requestID=uaySHcXyc0o5.0 txID=null sessionID=uaySHcXyc0o5 principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:33,005 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.005 requestID=L8MeUp92Tess.0 sourceCommandID=74 executionID=13 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=4943881
> 13:59:33,014 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.014 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async sql=EXEC source.native('rename source.a_stage source.a')
> 13:59:33,723 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue19) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.723 requestID=L8MeUp92Tess.0 sourceCommandID=79 executionID=15 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=source translatorName=tr-override sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=0 cpuTime(ns)=4426814
> 13:59:33,731 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess START DATA SRC COMMAND: startTime=2018-03-01 13:59:33.731 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sql=UPDATE h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE SET LoadNumber = 2, LoadState = 'LOADED', valid = TRUE, Updated = {ts'2018-03-01 13:59:33.725'}, Cardinality = 2 WHERE (VDBName = 'teiid5259') AND (VDBVersion = 1) AND (schemaName = 'View') AND (Name = 'mat_a') AND (loadNumber = 2)
> 13:59:33,732 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess SOURCE SRC COMMAND: endTime=2018-03-01 13:59:33.732 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async sourceCommand=[UPDATE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" SET "LOADNUMBER" = 2, "LOADSTATE" = 'LOADED', "VALID" = 1, "UPDATED" = TIMESTAMP '2018-03-01 13:59:33.725', "CARDINALITY" = ? WHERE "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBNAME" = 'teiid5259' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."VDBVERSION" = 1 AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."SCHEMANAME" = 'View' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."NAME" = 'mat_a' AND "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE"."LOADNUMBER" = 2]
> 13:59:33,737 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END SRC COMMAND: endTime=2018-03-01 13:59:33.737 requestID=L8MeUp92Tess.0 sourceCommandID=80 executionID=16 txID=TransactionImple < ac, BasicAction: 0:ffff0a2804e2:b3ef2e2:5a97f919:f status: ActionStatus.RUNNING > modelName=h2Source translatorName=h2 sessionID=L8MeUp92Tess principal=embedded-async finalRowCount=1 cpuTime(ns)=3747146
> 13:59:33,740 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue20) L8MeUp92Tess END USER COMMAND: endTime=2018-03-01 13:59:33.74 requestID=L8MeUp92Tess.0 txID=null sessionID=L8MeUp92Tess principal=embedded-async vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> 13:59:35,871 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) eP8bDNkHEpSG START USER COMMAND: startTime=2018-03-01 13:59:35.871 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG applicationName=JDBC principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 sql=SELECT COUNT(*) FROM mat_a
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.VALID, g_0.LOADSTATE FROM h2Source.DB.PUBLIC.DV_MATVIEWS_STATUSTABLE AS g_0 WHERE (g_0.VDBNAME = 'teiid5259') AND (g_0.VDBVERSION = 1) AND (g_0.SCHEMANAME = 'View') AND (g_0.NAME = 'mat_a')
> 13:59:35,877 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue22) eP8bDNkHEpSG SOURCE SRC COMMAND: endTime=2018-03-01 13:59:35.877 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security sourceCommand=[SELECT g_0."VALID", g_0."LOADSTATE" FROM "DB"."PUBLIC"."DV_MATVIEWS_STATUSTABLE" AS g_0 WHERE g_0."VDBNAME" = 'teiid5259' AND g_0."VDBVERSION" = 1 AND g_0."SCHEMANAME" = 'View' AND g_0."NAME" = 'mat_a']
> 13:59:35,878 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue23) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:35.878 requestID=eP8bDNkHEpSG.0 sourceCommandID=6 executionID=17 txID=null modelName=h2Source translatorName=h2 sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=904441
> 13:59:35,879 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue24) eP8bDNkHEpSG START DATA SRC COMMAND: startTime=2018-03-01 13:59:35.879 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security sql=SELECT g_0.id FROM source.a AS g_0
> 13:59:36,326 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue25) eP8bDNkHEpSG END SRC COMMAND: endTime=2018-03-01 13:59:36.326 requestID=eP8bDNkHEpSG.0 sourceCommandID=9 executionID=18 txID=null modelName=source translatorName=tr-override sessionID=eP8bDNkHEpSG principal=user@teiid-security finalRowCount=1 cpuTime(ns)=32679662
> 13:59:36,384 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue26) eP8bDNkHEpSG END USER COMMAND: endTime=2018-03-01 13:59:36.384 requestID=eP8bDNkHEpSG.0 txID=null sessionID=eP8bDNkHEpSG principal=user@teiid-security vdbName=teiid5259 vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months