[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin commented on TEIID-5856:
--------------------------------------
Used ddl:
{code}
CREATE DATABASE db;
USE DATABASE db;
CREATE FOREIGN DATA WRAPPER salesforce;
CREATE FOREIGN DATA WRAPPER mysalesforce type salesforce OPTIONS (supportsOrderBy true);
CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce');
CREATE SCHEMA sf SERVER salesforce;
IMPORT FROM SERVER salesforce INTO sf OPTIONS("importer.useFullSchemaName" 'false', "importer.NormalizeNames" 'false', "importer.modelAuditFields" 'true', "importer.importStatstics" 'true');
{code}
{code}
SELECT * FROM SYS.tables WHERE Name='Product_License__c'
{code}
{code}
{
"Description": null,
"Cardinality": -1,
"NameInSource": "Product_License__c",
"Name": "Product_License__c",
"UID": "tid:000005adccd6-9897fe32-00000545",
"Type": "Table",
"IsPhysical": true,
"SupportsUpdates": true,
"IsMaterialized": false,
"VDBName": "db",
"IsSystem": false,
"SchemaUID": "tid:000005adccd6-00000e53-00000000",
"SchemaName": "sf"
}
{code}
SQL:
{code}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.Id as replacementLicenseObjectId FROM Product_License__c originalLicense LEFT OUTER JOIN Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
PLAN
{code}
ProjectNode
+ Relational Node ID:0
+ Output Columns:
0: Id (string)
1: Status__c (string)
2: ReplacementLicenseID__c (string)
3: LicenseId__c (string)
4: vlic_Contract_Number__c (string)
5: replacementLicenseId (string)
6: replacementLicenseObjectId (string)
+ Cost Estimates:Estimated Node Cardinality: -1.0
+ Child 0:
JoinNode
+ Relational Node ID:1
+ Output Columns:
0: Id (string)
1: Status__c (string)
2: ReplacementLicenseID__c (string)
3: LicenseId__c (string)
4: vlic_Contract_Number__c (string)
5: LicenseId__c (string)
6: Id (string)
+ Cost Estimates:Estimated Node Cardinality: -1.0
+ Child 0:
AccessNode
+ Relational Node ID:2
+ Output Columns:
0: ReplacementLicenseID__c (string)
1: Id (string)
2: Status__c (string)
3: LicenseId__c (string)
4: vlic_Contract_Number__c (string)
+ Cost Estimates:Estimated Node Cardinality: -1.0
+ Query:SELECT sf.Product_License__c.ReplacementLicenseID__c, sf.Product_License__c.Id, sf.Product_License__c.Status__c, sf.Product_License__c.LicenseId__c, sf.Product_License__c.vlic_Contract_Number__c FROM sf.Product_License__c WHERE sf.Product_License__c.vlic_Contract_Number__c = ?
+ Model Name:sf
+ Child 1:
AccessNode
+ Relational Node ID:3
+ Output Columns:
0: Id (string)
1: LicenseId__c (string)
+ Cost Estimates:Estimated Node Cardinality: -1.0
+ Query:SELECT sf.Product_License__c.Id, sf.Product_License__c.LicenseId__c FROM sf.Product_License__c
+ Model Name:sf
+ Join Strategy:ENHANCED SORT JOIN (SORT/SORT)
+ Join Type:LEFT OUTER JOIN
+ Join Criteria:originalLicense.ReplacementLicenseID__c=replacementLicense.Id
+ Select Columns:
0: originalLicense.Id
1: originalLicense.Status__c
2: originalLicense.ReplacementLicenseID__c
3: originalLicense.LicenseId__c
4: originalLicense.vlic_Contract_Number__c
5: replacementLicense.LicenseId__c AS replacementLicenseId
6: replacementLicense.Id AS replacementLicenseObjectId
+ Data Bytes Sent:7
+ Planning Time:6
{code}
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIIDSB-144) Calling setTransactionIsolation on pg driver causes the connection to be closed
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-144?page=com.atlassian.jira.plugi... ]
Steven Hawkins reassigned TEIIDSB-144:
--------------------------------------
Assignee: Steven Hawkins
> Calling setTransactionIsolation on pg driver causes the connection to be closed
> -------------------------------------------------------------------------------
>
> Key: TEIIDSB-144
> URL: https://issues.jboss.org/browse/TEIIDSB-144
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 1.3.0
>
>
> An attempt to set the isolation level on pg 42.2.8 resulted in an exception SQLSTATE 0a000 - unsupported - which causes the connection pool to mark the connection as broken:
> {code}
> 2019-11-25 23:07:50.125 WARN 43993 --- [ProcessorQueue6] com.zaxxer.hikari.pool.ProxyConnection : HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@2ffebc7e marked as broken because of SQLSTATE(0A000), ErrorCode(0)
> org.postgresql.util.PSQLException:
> at org.postgresql.jdbc.PgConnection.setTransactionIsolation(PgConnection.java:851) ~[postgresql-42.2.8.jar:42.2.8]
> at com.zaxxer.hikari.pool.ProxyConnection.setTransactionIsolation(ProxyConnection.java:407) ~[HikariCP-3.2.0.jar:na]
> at com.zaxxer.hikari.pool.HikariProxyConnection.setTransactionIsolation(HikariProxyConnection.java) ~[HikariCP-3.2.0.jar:na]
> at org.teiid.translator.jdbc.JDBCBaseExecution.<init>(JDBCBaseExecution.java:72) ~[translator-jdbc-12.3.0.jar:12.3.0]
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIIDSB-144) Calling setTransactionIsolation on pg driver causes the connection to be closed
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-144?page=com.atlassian.jira.plugi... ]
Steven Hawkins commented on TEIIDSB-144:
----------------------------------------
This is noted in https://github.com/brettwooldridge/HikariCP/issues/1489 and was introduced with https://github.com/brettwooldridge/HikariCP/issues/1003
It is indeed the expectation of HikariCP that the connection is closed and needs to be re-obtained - so their assumption effectively is that the exception will happen as part of a validation check. As this and the 1489 issue shows that assumption is invalid.
Unfortunately this may open us up to a whole class of these issues as there are quite a few places in the base jdbc code where we expect to catch sql exceptions and keep going.
This needs a little more examination.
> Calling setTransactionIsolation on pg driver causes the connection to be closed
> -------------------------------------------------------------------------------
>
> Key: TEIIDSB-144
> URL: https://issues.jboss.org/browse/TEIIDSB-144
> Project: Teiid Spring Boot
> Issue Type: Bug
> Components: datasource
> Reporter: Steven Hawkins
> Priority: Major
> Fix For: 1.3.0
>
>
> An attempt to set the isolation level on pg 42.2.8 resulted in an exception SQLSTATE 0a000 - unsupported - which causes the connection pool to mark the connection as broken:
> {code}
> 2019-11-25 23:07:50.125 WARN 43993 --- [ProcessorQueue6] com.zaxxer.hikari.pool.ProxyConnection : HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@2ffebc7e marked as broken because of SQLSTATE(0A000), ErrorCode(0)
> org.postgresql.util.PSQLException:
> at org.postgresql.jdbc.PgConnection.setTransactionIsolation(PgConnection.java:851) ~[postgresql-42.2.8.jar:42.2.8]
> at com.zaxxer.hikari.pool.ProxyConnection.setTransactionIsolation(ProxyConnection.java:407) ~[HikariCP-3.2.0.jar:na]
> at com.zaxxer.hikari.pool.HikariProxyConnection.setTransactionIsolation(HikariProxyConnection.java) ~[HikariCP-3.2.0.jar:na]
> at org.teiid.translator.jdbc.JDBCBaseExecution.<init>(JDBCBaseExecution.java:72) ~[translator-jdbc-12.3.0.jar:12.3.0]
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5856:
---------------------------------------
Again double check if the table cardinality is set. If it's not, then it would need to be determined what's wrong with the stats import. Essentially that's implemented as a separate sf query at import time for each table.
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIID-5856) Teiid generate wrong request to salesforce
by Renat Eskenin (Jira)
[ https://issues.jboss.org/browse/TEIID-5856?page=com.atlassian.jira.plugin... ]
Renat Eskenin commented on TEIID-5856:
--------------------------------------
ddl
{code:sql}
CREATE DATABASE db;
USE DATABASE db;
CREATE FOREIGN DATA WRAPPER salesforce;
CREATE FOREIGN DATA WRAPPER mysalesforce type salesforce OPTIONS (supportsOrderBy true);
CREATE SERVER salesforce FOREIGN DATA WRAPPER salesforce OPTIONS ("resource-name" 'salesforce');
CREATE SCHEMA sf SERVER salesforce;
IMPORT FROM SERVER salesforce INTO sf OPTIONS("importer.useFullSchemaName" 'false', "importer.NormalizeNames" 'false', "importer.modelAuditFields" 'true', "importer.importStatstics" 'true');
{code}
I maked this request:
{code:sql}
SELECT originalLicense.Id,originalLicense.Status__c,originalLicense.ReplacementLicenseID__c,originalLicense.LicenseId__c,originalLicense.vlic_Contract_Number__c,replacementLicense.LicenseId__c as replacementLicenseId ,replacementLicense.Id as replacementLicenseObjectId FROM Product_License__c originalLicense LEFT OUTER JOIN Product_License__c replacementLicense ON originalLicense.ReplacementLicenseID__c = replacementLicense.Id where originalLicense.vlic_Contract_Number__c = :contractNumber
{code}
and teiid still get all data
{code}
[30m[2019-11-26 18:52:54,507 MSK][0;39m [32mDEBUG[0;39m [31m[salesforce-failover-facade,,,][0;39m [36morg.teiid.CONNECTOR [0;39m [30m[Worker1_QueryProcessorQueue2][0;39m: 6LyQykah7Z6X.0.3.2 Processing NEW request: SELECT sf.Product_License__c.Id, sf.Product_License__c.LicenseId__c FROM sf.Product_License__c
{code}
> Teiid generate wrong request to salesforce
> ------------------------------------------
>
> Key: TEIID-5856
> URL: https://issues.jboss.org/browse/TEIID-5856
> Project: Teiid
> Issue Type: Bug
> Components: Salesforce Connector
> Environment: spring-boot teiid salesforce-connector
> Reporter: Renat Eskenin
> Assignee: Steven Hawkins
> Priority: Major
>
> When i call request to salesforce teiid get very long wrong request and then OOM, because teiid request all data in salesforce object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIIDSB-142) teiid-openshift-examples enhancements
by Bilgin Ibryam (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-142?page=com.atlassian.jira.plugi... ]
Bilgin Ibryam commented on TEIIDSB-142:
---------------------------------------
cool, I see I can do the following:
- name: SPRING_DATASOURCE_SAMPLEDB_USERNAME
valueFrom:
secretKeyRef:
key: database-user
name: postgresql
I will try to update example
> teiid-openshift-examples enhancements
> -------------------------------------
>
> Key: TEIIDSB-142
> URL: https://issues.jboss.org/browse/TEIIDSB-142
> Project: Teiid Spring Boot
> Issue Type: Enhancement
> Components: examples
> Reporter: Bilgin Ibryam
> Priority: Optional
>
> While setting up the example [scenarios|https://github.com/teiid/teiid-openshift-examples/blob/master/r...] the Secret seems unnecessary? Is it really used?
> # CREATE SECRET TO CONNECT TO DATABASE (ADJUST TO YOUR VALUES)
> oc create -f - <<EOF
> apiVersion: v1
> kind: Secret
> metadata:
> name: postgresql
> type: Opaque
> stringData:
> database-user: user
> database-name: sampledb
> database-password: mypassword
> EOF
> Also the following steps can be shortened:
> oc get pods
> oc rsh postgres-xxxxx
> to
> oc rsh $(oc get pods -o name -l app=postgresql)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (TEIIDSB-141) Add a message to PlatformTransactionManagerAdapter exceptions
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIIDSB-141?focusedWorklogId=12448126&pag... ]
Steven Hawkins logged work on TEIIDSB-141:
------------------------------------------
Author: Steven Hawkins
Created on: 26/Nov/19 10:35 AM
Start Date: 26/Nov/19 10:34 AM
Worklog Time Spent: 30 minutes
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 30 minutes)
Time Spent: 30 minutes
Worklog Id: (was: 12448126)
> Add a message to PlatformTransactionManagerAdapter exceptions
> -------------------------------------------------------------
>
> Key: TEIIDSB-141
> URL: https://issues.jboss.org/browse/TEIIDSB-141
> Project: Teiid Spring Boot
> Issue Type: Quality Risk
> Components: core, datasource
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 1.3.0
>
> Original Estimate: 30 minutes
> Time Spent: 30 minutes
> Remaining Estimate: 0 minutes
>
> The PlatformTransactionManagerAdapter will throw SystemExceptions without a message when attempting to initiate a transaction (non-spring managed). There should be a message that a full transaction manager is required.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month