Extend Sequoia controller to handle differences in backend driver handling of 
setFetchSize() hints
--------------------------------------------------------------------------------------------------

         Key: SEQUOIA-1001
         URL: https://forge.continuent.org/jira/browse/SEQUOIA-1001
     Project: Sequoia
        Type: New Feature

    Versions: Sequoia 2.10.9    
 Environment: All
    Reporter: Robert Hodges
     Fix For: sequoia 2.10.10


JDBC setFetchSize() calls allow users to request that results be streamed back 
from backends into clients.   Sequoia handles setFetchSize calls (for example 
Statement.setFetchSize() consistently, but underlying drivers may reject hints, 
which means that the result set, however large, is just streamed into memory.  
This is a problem because it is necessary to fetch subsets of rows for large 
result sets.   Testing with Bristlecone shows that even result sets of 100K 
rows quickly cause the controller to run out of Java heap space. 

For example MySQL Connector/J only accepts Integer.MIN_VALUE as a fetch size 
hint and ignores all other settings (i.e., they are the same as 0).  Other JDBC 
drivers may have similar behavior.  This is a problem because Sequoia generally 
follows the JDBC specification, so we need the ability to map fetch size values 
to what ever wierdness the driver accepts. 

This feature extends the Sequoia ControllerFactory to add a 
DriverComplianceFactory.  The factory in turn returns DriverCompliance 
instances, thereby making it possible to extend them.   Finally, the 
DriverCompliance class has a new method DriverCompliance.convertFetchSize() 
which converts requested fetch values to a reasonable value for the underlying 
driver.  The default implementation simply hands back the requested value but 
other implementations can perform different conversions if desired. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to