You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2018/04/25 12:20:00 UTC

[jira] [Assigned] (IGNITE-6983) SQL: optimize CREATE INDEX and BPlusTree interaction

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

Vladimir Ozerov reassigned IGNITE-6983:
---------------------------------------

    Assignee: Taras Ledkov

> SQL: optimize CREATE INDEX and BPlusTree interaction
> ----------------------------------------------------
>
>                 Key: IGNITE-6983
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6983
>             Project: Ignite
>          Issue Type: Task
>          Components: cache, sql
>            Reporter: Vladimir Ozerov
>            Assignee: Taras Ledkov
>            Priority: Major
>              Labels: performance
>
> Currently index is built as follows:
> 1) Get next entry from partition's tree
> 2) Read it's key (copy to heap)
> 3) Acquire lock on {{GridCacheMapEntry}}
> 4) Lookup the same key in the tree from the top
> 5) Read it's value (copy to heap)
> 6) Add to index.
> This is very complex flow. We can optimize two things - tree lookup and value deserialization as follows:
> 1) Every data page will have update counter, which is incremented every time anything is changed.
> 2) When lock on {{GridCacheMapEntry}} is acquired, we will acquire lock on the data page and re-check update counter. 
> 3) If page was changed between iterator read and lock acquisition then use old flow. 
> 4) Otherwise - set read lock on the page, read value as *offheap* object, apply it to index.



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