[ 
https://issues.apache.org/jira/browse/TRAFODION-2724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16137661#comment-16137661
 ] 

ASF GitHub Bot commented on TRAFODION-2724:
-------------------------------------------

GitHub user sandhyasun opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/1216

    TRAFODION-2724 

    Fix to ensure internal statements used to retrieve LOB descriptor chunks 
information during an extract are closed properly. The issue was if the the 
caller of extract passed in the exact length, the ""readCursorData method would 
return the correct data  but would leave the "open" to the internal table in a 
FETCH state. This change ensures that a second "fetch" is done so EOD would be 
seen and as a result the internal statement would get closed within the  method 
ExLob::fethCursor which would call SQL_EXEC_LOBcliInterface(handleIn, 
handleLenIn, ....
                                         LOB_CLI_SELECT_CLOSE, .....)
     

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sandhyasun/incubator-trafodion 
san_2.2traf_misc

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafodion/pull/1216.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1216
    
----
commit 89576f3dc7f5e37977ec3cdd9f0fd5ecadee0d36
Author: Sandhya Sundaresan <[email protected]>
Date:   2017-08-22T17:38:42Z

    Changes to take care of closing internal cursor statement when extract 
operation is done and the exact length of data is passed in to be extracted.

commit 8a260f425e0527100c8039b8db8a8b4db64b1101
Author: Sandhya Sundaresan <[email protected]>
Date:   2017-08-22T17:41:39Z

    Expected file change to show result of unload.

----


> JDBC LOB tests show symptoms of a leaked statement handle
> ---------------------------------------------------------
>
>                 Key: TRAFODION-2724
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2724
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-exe
>    Affects Versions: 2.2-incubating
>            Reporter: Sandhya Sundaresan
>            Assignee: Sandhya Sundaresan
>             Fix For: 2.2-incubating
>
>
> The number of opens for any mxosrvr is limited to 13 due to a recent change. 
> This exposed an issue where we were not closing some internal statements 
> during an extract statement . JDBC driver uses the SQL extract statment to 
> implement the stream API. This exposed the issue.
> The test failed with this error:
> > 2017-08-16 01:12:27 Running testBatchInsertFKNotExist......
> > 2017-08-16 01:12:56 Batch Update Failed, See next exception for 
> > details
> > 2017-08-16 01:12:56 *** ERROR[8103] The operation is prevented by 
> > referential integrity constraint
> > TRAFODION.T4QA.BATCH_TEST_TABLE_FK_911645628_4551 on table 
> > TRAFODION.T4QA.BATCH_TEST_TABLE_FK.
> > 2017-08-16 01:13:11 *** ERROR[2026] Server Process $ZSM0 has reached 
> > allowed depth for nowait operation from the process 0,15846.
> > [2017-08-16 01:13:11]
> > 
> Debugging and dumping hte open and fetch statements in the context at that 
> point showed this pattern :
> There were around 13 statements in OPEN or FETCH statement with the 
> > source string "select dataOffset, chunkLen, stringParam from 
> > table(ghost table
> > "TRAFODION"."T4QA"."LOBDescChunks__08574991311373262837_0002")
> > where descPartnKey = and descSyskey = "
> > 
> > These internal statements should be closed for the jdbc_test_cdh to 
> > pass or comment out the tests that triggers these internal statements 
> > for time being.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to