[
https://issues.apache.org/jira/browse/IGNITE-7583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378611#comment-16378611
]
Roman Kondakov edited comment on IGNITE-7583 at 2/27/18 1:58 PM:
-----------------------------------------------------------------
Page layouts after this patch.
Data page entry layout (DataPageIO):
# Payload: 2 bytes. Payload size. Highest bit == fragmented flag.
# Next link: 8 or 0 bytes. Link to the next page if fragmented flag == true,
or empty if row is not fragmented
# MVCC info: 32 or 0 bytes. Create TX number - xid_min (16 bytes - two longs:
coordinator id and counter id) and delete TX number - xid_max (16 bytes - two
longs: coordinator id and counter id) if MVCC is enabled, or 0 bytes if MVCC is
not enabled. These MVCC info is always located on the very first data page in
pages chain for fast access to these fields.
# Cache id: 4 or 0 bytes. Cache ID if it is a cache in a cache group.
# Key: >5 bytes. 4 bytes - key length, 1 byte - key type and others - is a
byte array with the key binary representation.
# Expire time: 8 bytes.
# Value: >5 bytes. 4 bytes - value length, 1 byte - value type and others - is
a byte array with the value binary representation.
# Grid cache version: 17 or 33 bytes - depends on GridCacheVersion
implementation.
Cache data tree item layout (AbstractDataInnerIO/AbstractDataLeafIO):
# Link: 8 bytes. Link to row.
# Hash: 4 bytes. Row key hash.
# Cache id: 4 or 0 bytes. Cache ID if it is a cache in a cache group.
# MVCC info: 16 or 0 bytes. 0 if MVCC os disabled. If enabled it stores create
TX number - xid_min (16 bytes - two longs: coordinator id and counter id).
Index tree item layout (AbstractH2...IO):
# Link: 8 bytes. Link to row.
# MVCC info: 16 or 0 bytes. 0 if MVCC os disabled. If enabled it stores create
TX number - xid_min (16 bytes - two longs: coordinator id and counter id).
# Payload.
was (Author: rkondakov):
Data page entry layout (DataPageIO):
# Payload: 2 bytes. Payload size. Highest bit == fragmented flag.
# Next link: 8 or 0 bytes. Link to the next page if fragmented flag == true,
or empty if row is not fragmented
# MVCC info: 32 or 0 bytes. Create TX number - xid_min (16 bytes - two longs:
coordinator id and counter id) and delete TX number - xid_max (16 bytes - two
longs: coordinator id and counter id) if MVCC is enabled, or 0 bytes if MVCC is
not enabled. These MVCC info is always located on the very first data page in
pages chain for fast access to these fields.
# Cache id: 4 or 0 bytes. Cache ID if it is a cache in a cache group.
# Key: >5 bytes. 4 bytes - key length, 1 byte - key type and others - is a
byte array with the key binary representation.
# Expire time: 8 bytes.
# Value: >5 bytes. 4 bytes - value length, 1 byte - value type and others - is
a byte array with the value binary representation.
# Grid cache version: 17 or 33 bytes - depends on GridCacheVersion
implementation.
Cache data tree item layout (AbstractDataInnerIO/AbstractDataLeafIO):
# Link: 8 bytes. Link to row.
# Hash: 4 bytes. Row key hash.
# Cache id: 4 or 0 bytes. Cache ID if it is a cache in a cache group.
# MVCC info: 16 or 0 bytes. 0 if MVCC os disabled. If enabled it stores create
TX number - xid_min (16 bytes - two longs: coordinator id and counter id).
Index tree item layout (AbstractH2...IO):
# Link: 8 bytes. Link to row.
# MVCC info: 16 or 0 bytes. 0 if MVCC os disabled. If enabled it stores create
TX number - xid_min (16 bytes - two longs: coordinator id and counter id).
# Payload.
> SQL TX: Change secondary indexes structure
> ------------------------------------------
>
> Key: IGNITE-7583
> URL: https://issues.apache.org/jira/browse/IGNITE-7583
> Project: Ignite
> Issue Type: Task
> Components: sql
> Reporter: Igor Seliverstov
> Assignee: Roman Kondakov
> Priority: Major
>
> We need to change:
> * rows with the same key and different versions should be placed in a tree
> ordered by version decending
> * move next version from BTree leafs to data rows
> * filters according to next logic: the row is visible if leaf version is
> less than assigned and not active and max_version of referenced row is NA or
> heigher than assigned or active
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)