[
https://issues.apache.org/jira/browse/IGNITE-8900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528697#comment-16528697
]
Alexey Goncharuk commented on IGNITE-8900:
------------------------------------------
Going deeper in the code, the bug is caused by setting link based on {{pageId}}
that is written in the page header. When Ignite is running in in-memory mode,
entries from different partition IDs may be written to a single page, so we
should not read page ID from the page in order to construct a link.
Method call sequence:
* {{AbstractFreeList#insertDataRow}} - page ID is adjusted according to
partition ID
* {{WriteRowHandler#addRowFragment}} page ID is correct, but it calls an
overloaded method {{addRowFragment}} which accepts only page address, but not
page ID
* {{addRowFragment}} calls {{AbstractDataPageIO#setLink}} which accepts page
address and not page ID. At this point partition ID becomes invalid
Note that when an entry is not fragmented, we use another path and construct a
link based on {{pageId}}, not page addr.
> SqlFieldsQuery provides incorrect result when item size exceeds page size
> -------------------------------------------------------------------------
>
> Key: IGNITE-8900
> URL: https://issues.apache.org/jira/browse/IGNITE-8900
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.4
> Reporter: Anton Kurbanov
> Priority: Blocker
> Attachments: Main.java, Node.java
>
>
> Start several server nodes, then start client, execute queries with value
> range in where clause. Duplicate entries may be found, some entries may be
> missing.
> Results as an example:
> expected 5 results but got back 3 results (query range 610026643276160000 to
> 610026643276160004), cache.getAll returned 5 entries.
> expected 8 results but got back 7 results (query range 610026643276160000 to
> 610026643276160007), cache.getAll returned 8 entries.
> Query results: [610026643276160000, 610026643276160003, 610026643276160004,
> 610026643276160005, 610026643276160005, 610026643276160006,
> 610026643276160007]
> Please find reproducer attached.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)