[ 
https://issues.apache.org/jira/browse/IGNITE-6409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-6409:
------------------------------------
    Description: 
Currently the only way to update standard user index is through H2 
infrastructure. See {{GridH2IndexBase#put}} and it's usages. For every update 
we have to construct a kind of H2 row which will be passed to index. This 
operation might require unnecessary memory copying and deserializations. We 
should try to find a way to bypass H2 stuff altogether and add data to 
underlying {{BPlusTree}} directly.

Here is how this could be achieved:
1) Actual tree is {{H2Tree}}. It is accompanied by several helper classes 
({{InlineIndexHelper}}, {{H2*IO}}). 
2) We should remove all H2 stuff from there, and start using {{CacheDataRow}} 
instead of {{SearchRow}}
3) Refactored classes should be moved to core module.
4) Conversion to {{SearchRow}} should happen inside {{H2TreeIndex}} only when 
it is really needed.
5) Two operations {{putNative}} and {{getNative}} should be added to 
{{GridH2IndexBase}}. They should accept normal key-value objects instead of H2 
rows.
6) Finally, all index index update routines (cache put/get, {{CREATE INDEX}}) 
should be moved to {{putNative}}/{{getNative}} methods.

Note that IO classes should be reworked carefully to maintain backward 
compatibility.


  was:
Currently the only way to update standard user index is through H2 
infrastructure. See {{GridH2IndexBase#put}} and it's usages. For every update 
we have to construct a kind of H2 row which will be passed to index. This 
operation might require unnecessary memory copying and deserializations. We 
should try to find a way to bypass H2 stuff altogether and add data to 
underlying {{BPlusTree}} directly.

Here is how this could be achieved:
1) Actual tree is {{H2Tree}}. It is accompanied by several helper classes 
({{InlineIndexHelper}}, {{H2*IO}}). 
2) We should remove all H2 stuff from there, and start using {{CacheDataRow}} 
instead of {{SearchRow}}
3) Conversion to {{SearchRow}} should happen inside {{H2TreeIndex}} only when 
it is really needed.
4) Two operations {{putNative}} and {{getNative}} should be added to 
{{GridH2IndexBase}}. They should accept normal key-value objects instead of H2 
rows.
5) Finally, index creation routine should be moved to 
{{putNative}}/{{getNative}} methods.

Note that IO classes should be reworked carefully to maintain backward 
compatibility.



> SQL: bypass H2 during index update
> ----------------------------------
>
>                 Key: IGNITE-6409
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6409
>             Project: Ignite
>          Issue Type: Task
>          Components: persistence, sql
>    Affects Versions: 2.1
>            Reporter: Vladimir Ozerov
>              Labels: iep-1, performance
>             Fix For: 2.4
>
>
> Currently the only way to update standard user index is through H2 
> infrastructure. See {{GridH2IndexBase#put}} and it's usages. For every update 
> we have to construct a kind of H2 row which will be passed to index. This 
> operation might require unnecessary memory copying and deserializations. We 
> should try to find a way to bypass H2 stuff altogether and add data to 
> underlying {{BPlusTree}} directly.
> Here is how this could be achieved:
> 1) Actual tree is {{H2Tree}}. It is accompanied by several helper classes 
> ({{InlineIndexHelper}}, {{H2*IO}}). 
> 2) We should remove all H2 stuff from there, and start using {{CacheDataRow}} 
> instead of {{SearchRow}}
> 3) Refactored classes should be moved to core module.
> 4) Conversion to {{SearchRow}} should happen inside {{H2TreeIndex}} only when 
> it is really needed.
> 5) Two operations {{putNative}} and {{getNative}} should be added to 
> {{GridH2IndexBase}}. They should accept normal key-value objects instead of 
> H2 rows.
> 6) Finally, all index index update routines (cache put/get, {{CREATE INDEX}}) 
> should be moved to {{putNative}}/{{getNative}} methods.
> Note that IO classes should be reworked carefully to maintain backward 
> compatibility.



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

Reply via email to