DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
| ID | IEP-[NUMBER]125 | ||||||||
| Author | Unknown User (nizhikov) | ||||||||
| Sponsor | |||||||||
| Created | 12.07.2024 | ||||||||
| Status |
|
| Table of Contents |
|---|
Currently, Ignite provide several interfaces to query data:
...
The goal of IEP is to provide consistency and interoperability between Key-Value, SQL, Scan query, Index Query APIs.
Three query API has it's own advantages, use-cases and details, so description will be query API specific. In separate section different isolation levels will be described.
IgniteTxState.get or put invocation Ignite checks local state to get or store tx version of entry.GridCacheMvcc.SQL and other types of queries works on top of datastructures(BPlusTree) that stores data off-heap. This lead to the current behavior when transaction and queries not overlap.
Described implementation and issue has two obvious solutions:
...
This following of description part provides high-level details of proposed implementation:
New SQL Calcite engine gives Ignite the power to control execution flow. Proposed design of execution flow for different types of queries:
Currently, executed on transaction coordinator node. But, separate thread used to permorm plan with ModifyNode. This means we must do the following:
BaseQueryContext.ModifyNode in transaction resume/suspend.To invoke select statements correctly execution engine must know IgniteTxState in time of table(index) scan. Ignite must send IgniteTxState (possibly filtering out some entries) to the node that invokes query step. This will allow to SQL engine to mixup transaction state and table(index) data to achieve correct results.
No additional locks required. Currently, queries works on this isolation level but without knowledge of transaction changes.
Ignite must acquire shared-lock on each entry that conforms query criteria. This can be achieved in two ways: clause based locks, entry by entry locks. Decision must be made additionally in time of implementaion.
Ignite must acquire exclusive-lock on each entry that conforms query criteria. This can be achieved by clause based locks.
With SQL and Scan queries on strict isolation level it very simple for the end-user to acquire a lot of locks during "simple" query. Mechanism like CalciteQueryEngineConfiguration#getQueryMemoryQuota, CalciteQueryEngineConfiguration#getGlobalMemoryQuota must be created(or reused) to prevent user from harming server nodes.
| Jira | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|