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

Andrey Gura commented on IGNITE-4220:
-------------------------------------

[~akaigoro] Thanks for contribution! Looks good for me. But there is problem 
with resource management (connections and statements) in case when user 
provides {{Statement}} instances instead of query strings. From my point of 
view we should not close statement or connection in 
{{org.apache.ignite.cache.store.jdbc.CacheAbstractJdbcStore.LoadCacheCustomQueryWorker.
 call()}} because user have created this resources and she is responsible for 
decision making about releasing them.

Could you please fix this issue?

Also it makes sense to add tests for load cache in case with more than one 
statement and key type and additionally we should check that resources weren't 
closed.

> Allow to pass statements instead of strings to CacheStore.loadCache() 
> implementations
> -------------------------------------------------------------------------------------
>
>                 Key: IGNITE-4220
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4220
>             Project: Ignite
>          Issue Type: Improvement
>          Components: cache
>    Affects Versions: 1.7
>            Reporter: Valentin Kulichenko
>            Assignee: Alexei Kaigorodov
>             Fix For: 2.1
>
>
> Currently both Cassandra store and POJO store allow user to provide a set of 
> queries used for data loading. However, there are cases when user may want to 
> provide a {{Statement}} instead (e.g., prepared statements with parameter 
> binding are used). We should support {{Statement}} arguments in store 
> implementations as well as strings.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to