Bug 780674 (SOA-3116)

Summary: Reading CLOB's from Teradata has issues and produces exception when stream is read from a different thread than what the clob was read from the resultset
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Van Halbert <vhalbert>
Component: Documentation, EDSAssignee: Van Halbert <vhalbert>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.2.0 GA   
Target Milestone: ---   
Target Release: 5.2.0 GA   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-3116
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-14 20:27:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Van Halbert 2011-06-21 13:37:41 UTC
Workaround Description: If this is truly the case, then my vote is to KI this issue. Something along the lines of:

Teradata lobs can only be read from an embedded client using with the default option to use the calling thread and in single threaded mode (transactional or userRequestSourceConcurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.

Otherwise every Terardata lob Execution would have to either retain (leads to thread utilization issues) or reobtain (not generally possible, would require further customizing thread pooling logic) its executing thread to read the lob results. Neither of those options seems worth the effort.
project_key: SOA

The initial problem was seen when running BQT testing against the teradata source.   However, when debugging, the exception was occurring on the initial client read of the stream.    After reading teradata jdbc driver doc, it talks about how its not thread safe and has issues when different threads are handling blobs/clobs.   Which lead me to do a simple client test.   2 tests where run run thru a servlet that obtains the teradata connenction via jndi.   Thet are as follows (attached is the sample code after the changes used for #2):

1.   simple execute/select:   execute select intkey, objectvalue from bqt1.smalla,  for each row, obtain the clob and read the stream (no exception is seen)
2.   execute select and read clob in a different thread:     a new thread is created, passing in the clob, thread is started and then proceeds to try to read the stream, exceptions are seen


I'll attach the sample code.

Comment 1 Van Halbert 2011-06-21 13:37:42 UTC
Link: Added: This issue Cloned from TEIID-1648


Comment 2 Van Halbert 2011-06-21 13:38:17 UTC
Security: Added: Public


Comment 3 Van Halbert 2011-06-23 17:42:54 UTC
Release Notes Text: Added: Add as a KI to release notes;


Comment 4 Van Halbert 2011-06-28 00:48:42 UTC
Release Notes Text: Removed: Add as a KI to release notes; Added: Add as a KI to the 5.2 release notes;


Comment 5 David Le Sage 2011-07-15 05:52:21 UTC
Release Notes Docs Status: Added: Not Yet Documented
Writer: Added: dlesage


Comment 6 Van Halbert 2011-08-25 19:52:32 UTC
Workaround Description: Added: If this is truly the case, then my vote is to KI this issue. Something along the lines of:

Teradata lobs can only be read from an embedded client using with the default option to use the calling thread and in single threaded mode (transactional or userRequestSourceConcurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.

Otherwise every Terardata lob Execution would have to either retain (leads to thread utilization issues) or reobtain (not generally possible, would require further customizing thread pooling logic) its executing thread to read the lob results. Neither of those options seems worth the effort.


Comment 7 David Le Sage 2011-09-12 23:25:19 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Known Issue
Release Notes Text: Removed: Add as a KI to the 5.2 release notes; Added: https://issues.jboss.org/browse/SOA-3116

Teradata lobs can only be read from an embedded client using with the default option to use the calling thread and in single threaded mode (transactional or userRequestSourceConcurrency=1). Usage of Teradata lobs under any other configuration is unlikely to work.


Comment 8 David Le Sage 2011-09-28 03:37:50 UTC
Documented as known issue.  Assigning back to Van.

Comment 10 Paul Nittel 2011-11-14 20:27:55 UTC
Checked 5.2 release notes. Closed.