[ 
https://issues.apache.org/jira/browse/IGNITE-23034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17875455#comment-17875455
 ] 

Andrey Khitrin edited comment on IGNITE-23034 at 8/21/24 11:34 AM:
-------------------------------------------------------------------

[~zstan] yeah, you're right about index. That was my glitch, sorry. I should 
redefine this ticket and decrease its priority.

I've investigated more on this topic, and now it seems that this behavior also 
depends on the amount of replicas and/or partitions. When I set zone 
replication factor to 4 or a number of partitions to 5, a behavior on 3 
clusters would be the same as on the smaller cluster with default zone settings.


was (Author: JIRAUSER284463):
[~zstan] yeah, you're right about index. That was my glitch, sorry. I should 
redefine this ticket and decrease its priority.

I've investigated more on this topic, and now it seems that this behavior also 
depends on the amount of replicas and/or partitions. When I set zone 
replication factor to 4 or a number of partitions to 5, a behavior on 3 
clusters would be the same as on the smaller cluster.

> Index restrictions are ignored on insert in a cluster of 3+ nodes
> -----------------------------------------------------------------
>
>                 Key: IGNITE-23034
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23034
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0
>            Reporter: Andrey Khitrin
>            Priority: Critical
>              Labels: ignite-3, index, transaction
>
> *Steps to reproduce*:
> 1. Start AI3 cluster with *3 or more* nodes
> 2. Create a simple table with an index:
> {code:sql}
> CREATE TABLE indexed_kids(id INTEGER, name VARCHAR(100), primary key (id))
> CREATE INDEX indexed_kids_index on indexed_kids using SORTED (name)
> INSERT INTO indexed_kids (id, name) VALUES (1, 'Europe')
> {code}
> 3. Run 2 parallel transactions that try to insert values with the same value 
> for the *indexed column* (not PK!). For example:
> {code:sql}
> -- First transaction
> INSERT INTO indexed_kids (id, name) VALUES (9, 'Kolobok')
> -- Second transaction
> INSERT INTO indexed_kids (id, name) VALUES (12, 'Kolobok')
> {code}
> *Expected behavior*:
> Only the first transaction must success, and the second one must fail.
> *Actual behavior*:
> When a cluster size is 3 or greater, both transactions success, inserting two 
> rows with the same value into an indexed column.
> Important:
> * For clusters with size of 1 or 2 nodes, behavior is correct (only 1 
> transaction succeeds)
> * When we insert values with the same PK values, behavior is correct (only 1 
> transaction succeeds)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to