Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False conflicts when inserting in a not null field #7232

Closed
nuno-faria opened this issue Jan 28, 2022 · 0 comments
Closed

False conflicts when inserting in a not null field #7232

nuno-faria opened this issue Jan 28, 2022 · 0 comments
Labels
bug
Milestone

Comments

@nuno-faria
Copy link
Contributor

@nuno-faria nuno-faria commented Jan 28, 2022

Describe the bug
MonetDB recently added the option to perform transactional non-conflicting inserts concurrently. However, if the field being inserted is defined as NOT NULL, one of the inserts fails. This also causes non-transactional inserts to conflict when the inserts contain multiple rows (e.g. INSERT INTO Test VALUES (1), (2), ...).

To Reproduce

  • Create a test table with a NOT NULL field:
    CREATE TABLE Test (k int NOT NULL);
  • Perform two concurrent transactions:
    -- T1
    BEGIN TRANSACTION;
    INSERT INTO Test VALUES (1);
    COMMIT;
    
    -- T2
    BEGIN TRANSACTION;
    INSERT INTO Test VALUES (2);
    COMMIT;
    
    -- last to commit is aborted
  • If the table is instead created without the NOT NULL (CREATE TABLE Test (k int)), both inserts succeed.

Expected behavior
Both inserts to succeed.

Software versions

  • MonetDB v11.43.6 Jan22
  • Ubuntu 20.04 LTS
  • Self-installed and compiled
@PedroTadim PedroTadim added the bug label Jan 28, 2022
@PedroTadim PedroTadim added this to the NEXTRELEASE milestone Jan 28, 2022
monetdb-team pushed a commit that referenced this issue Jan 28, 2022
…ng not null columns. There is no penalty in doing it concurrently
@sjoerdmullender sjoerdmullender removed this from the NEXTRELEASE milestone Feb 14, 2022
@sjoerdmullender sjoerdmullender added this to the Jan2022-SP1 milestone Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug
Projects
None yet
Development

No branches or pull requests

3 participants