Skip to content

Index: commits with conflicts not detected #1076

@MarcusDenker

Description

@MarcusDenker

When you have two transactions changing the same key, after we commit one, the second commit should be an errror.

This tests shows that currently, as expected, a new transaction sees the changes of "tx1 commit", but
the second commit raises no error:

testConcurrentAddKey2
	| tx1 tx2 tx3 |
	tx1 := soil newTransaction.
	tx1 root: dict.
	tx1 commit.
	
	tx1 := soil newTransaction.
	tx1 root
		at: #one put: #onevalue.
	tx2 := soil newTransaction.
	"We change the same key in tx2"
	tx2 root
		at: #one put: #twovalue.
	tx1 commit.
	tx2 commit. "the second should be error"
	
	tx3 := soil newTransaction.
	self assert: (tx3 root at: #one) equals: #onevalue.

testRemoveKeyWithTwoTransactions is a skipped test for the case of remove

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions