-
Notifications
You must be signed in to change notification settings - Fork 8
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
Index: removing an already removed entry #560
Comments
The same problem means that changes are ingored, too. Nothing should prevent us tx1 to change the value (locally).
But the tests fails |
We have already a skipped test that fails due to the same reason I think: SoilIndexedDictionaryTest>>#testRemoveKeyWithTwoTransactions
The remove is not working as the value is restored when checking for #size |
a halt in SoilIndexIterator>>#historicValueAt:ifAbsent: is the best place to check what happens -> when a value is removed, it has ID 0:0 Now if we remove a value and commit, but then remove it again, the situation is exactly the same So when we ask e.g. for size, it sees the removed value and as we do not have any way to know that it has been removed in this transaction, too, we restore just the same as if the second remove would not have happend. We need to not restore if a values is removed in the current transaction. Possible soltutions:
|
This is an edge case for the multiple concurrent transaction case as seen in testDoWithTransAction
-> we open tx1
-> we open tx2
-> in tx2 we remove key 1
-> we commit tx2
After this, tx1 should still see key 1, as it was only removed in tx2. #testDoWithTransAction is test for exactly that case and it works.
But now let's remove the key 1 in tx1, too, that is, we do this at the end of #testDoWithTransAction
Expected
-> we should be able to remove, as long as we do not commit. A commit should I think then not be possible, as the other transaction was already commited.
What happens
-> removeKey tags value as removed again (restoring the value to set removeValue correctly)
-> This looks the same as before
-> as this case is not distinguishable from the remove in the other transaction, do: will now restore just the same
-> assert fails as counter is 2
The text was updated successfully, but these errors were encountered: