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

Vladimir Ozerov edited comment on IGNITE-9256 at 8/22/18 2:48 PM:
------------------------------------------------------------------

[~SGrimstad], my comments:

1) {{H2ResultSetIterator.onClose}} - let's do not throw any exception from 
here. To achieve this pay attention to {{closeStmt}} field - it is always 
{{false}}, so we can simply delete it.

2) {{H2ResultSetIteratorNullifyOnEnd}} - test is not included into any suite

3) {{H2ResultSetIteratorNullifyOnEnd}} - please fix styling violations (missing 
headers, blank lines)

4) Test coverage is insufficient - only local SQL fields query is tested. 
Moreover, private API is used for some reason, what increases a risk to 
something. Instead, queries should be executed through public API, and the 
following scenarios should be tested:
 * SqlQuery 
 * SqlQuery with setLocal(true)
 * SqlFieldsQuery
 * SqlFieldsQuery with setLocal(true)


was (Author: vozerov):
[~SGrimstad], my comments:

1) {{H2ResultSetIterator.onClose}} - let's do not throw any exception from 
here. To achieve this pay attention to {{closeStmt}} field - it is always 
{{false}}, so we can simply delete it.

2) {{H2ResultSetIteratorNullifyOnEnd}} - test is not included into any suite

3) {{H2ResultSetIteratorNullifyOnEnd}} - please fix styling violations (missing 
headers, blank lines, 

4) Test coverage is insufficient - only local SQL fields query is tested. 
Moreover, private API is used for some reason, what increases a risk to 
something. Instead, queries should be executed through public API, and the 
following scenarios should be tested:
 * SqlQuery 
 * SqlQuery with setLocal(true)
 * SqlFieldsQuery
 * SqlFieldsQuery with setLocal(true)

> SQL: make sure that fetched results are cleared from iterator when last 
> element is fetched
> ------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-9256
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9256
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.6
>            Reporter: Vladimir Ozerov
>            Assignee: Sergey Grimstad
>            Priority: Major
>              Labels: sql-stability
>             Fix For: 2.7
>
>         Attachments: IGNITE-9256__Implemented.patch
>
>
> In practice it is possible for user to forget to nullify Ignite's result set 
> after iteration is finished. Or he may delay cleanup for some reason. 
> The problem is that we hold the whole H2's result set inside our iterator 
> even after all results are delivered to the user. 
> We should forcibly close and then nullify all H2 objects once all results are 
> returned. 
> Key code pieces:
> {{IgniteH2Indexing.executeSqlQueryWithTimer}} - how we get result from H2
> {{H2ResultSetIterator}} - base iterator with H2 objects inside



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to