[
https://issues.apache.org/jira/browse/IGNITE-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16365686#comment-16365686
]
Vladimir Ozerov commented on IGNITE-7253:
-----------------------------------------
[~al.psc], in general patch looks good. But the follow issues should be
addressed before merge:
1) JdbcConnection, JdbcThinStatement, DmlStatementsProcessor: "Only tuple based
INSERT statements are supported in streaming mode" - I would rewrite it as
"Only INSERT statements without SELECT are supported in streaming mode.". Can
we avoid duplication in these 3 places and simply throw an excpetion from
"IgniteH2Indexing.isStreamableInsertStatement"?
2) JdbcThinStatement.batchSize - I do not think we need this variable. We
cannot know precise update count when using streamer. Instead of giving user
fake sense that he updated N records, why can't we jsut return zero?
3) JdbcRequestHandler.executeBatchedQuery - same thing, no need to maintain
update counters, just return zero.
4) JdbcRequestHandler.executeQuery - incorrect error message ("only commands
INSERT, SET, and FLUSH are supported")
5) Styling: please make sure that all exception messages end with dot.
6) {{IgniteH2Indexing#streamUpdateQuery}} - looks like this method is never
used in current implementation and is safe to remove, since we always use
batched code path (also consider removing
{{GridQueryProcessor.streamUpdateQuery}})
6) Please confirm that we have enough tests for different cases:
- Same statements in batch (try both regular, prepared)
- Different statements in batch (regular, prepared, regular+prepared)
- Multi-statements (e.g. {{INSERT INTO ...; INSERT INTO ...}})
- Statements with and without column lists ({{INSERT INTO t (columns) VALUES
(values)}}, {{INSERT INTO t VALUES (values}})
> JDBC thin driver: introduce streaming mode
> ------------------------------------------
>
> Key: IGNITE-7253
> URL: https://issues.apache.org/jira/browse/IGNITE-7253
> Project: Ignite
> Issue Type: Task
> Components: jdbc, sql
> Reporter: Vladimir Ozerov
> Assignee: Alexander Paschenko
> Priority: Major
> Fix For: 2.5
>
>
> Should be done after IGNITE-6022. We should allow optional streaming mode for
> JDBC driver. In this mode only INSERTs without SELECT should be possible. All
> other DML operations should throw an exception.
> Design considerations:
> 1) Add command {{SET STREAMING=1|ON|0|OFF}} which will enable or disable
> streaming for connection.
> 2) Add command {{STREAMER FLUSH}} which will force data flush.
> 3) Only INSERT without SELECT works, all other DML statements should throw an
> exception
> 4) It should be possible to stream into several tables simultaneously (i.e.
> several streamers could be opened)
> 5) Any DDL statement should force flush of all currently opened streamers.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)