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

Alexander Paschenko commented on IGNITE-6024:
---------------------------------------------

[~skalashnikov], my comments:

1. Why has {{UpdatePlan}} become mutable? As before, it's initialized fully in 
one place. Please refactor to return immutability.

2. Why {{GridH2DmlResponse}} carries only error string? We already have had to 
pull error code to thin JDBC response, probably we should preserve code here 
too? [~vozerov], what do you think?

3. What is semantic of distributed {{MERGE}} or {{INSERT}} without subquery? If 
I issue {{MERGE INTO Person(id, name) values (1, 'a'), (2, 'b'), (3, 'c')}}, 
how it will work? I don't see any code that would check this. Intuitively, it 
should be somewhere around {{DmlStatementsProcessor#checkPlanCanBeDistributed}}.

4. {{DmlStatementsProcessor#checkPlanCanBeDistributed}}: why we don't care 
about statements caching here? ({{PreparedStatement stmt = 
conn.prepareStatement(plan.selectQry)}}) - looks like this could introduce an 
inevitable parsing.

5. Option name {{updateOnServer}} looks confusing to me. Isn't something like 
{{distributedDml}} better?

> SQL: execute DML statements on the server when possible
> -------------------------------------------------------
>
>                 Key: IGNITE-6024
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6024
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>            Assignee: Sergey Kalashnikov
>              Labels: important, performance
>             Fix For: 2.3
>
>
> Currently we execute DML statements as follows:
> 1) Get query result set to the client
> 2) Construct entry processors and send them to servers in batches
> This approach is inefficient as it causes a lot of unnecessary network 
> communication  Instead, we should execute DML statements directly on server 
> nodes when it is possible.
> Implementation considerations:
> 1) Determine set of queries which could be processed in this way. E.g., 
> {{LIMIT/OFFSET}}, {{GROUP BY}}, {{ORDER BY}}, {{DISTINCT}}, etc. are out of 
> question - they must go through the client anyway. Probably 
> {{skipMergeTable}} flag is a good starting point (good, not precise!)
> 2) Send request to every server and execute local DML right there
> 3) No failover support at the moment - throw "partial update" exception if 
> topology is unstable
> 4) Handle partition reservation carefully
> 5) Transactions: we still have single coordinator - this is a client. When 
> MVCC and TX SQL is ready, client will assign proper counters to server 
> requests.



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

Reply via email to