-
Notifications
You must be signed in to change notification settings - Fork 89
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
Implementation of strong consistency using locks #387
base: master
Are you sure you want to change the base?
Conversation
From the documentation:
What message is then sent to the client? |
@@ -0,0 +1,58 @@ | |||
%% ------------------------------------------------------------------- | |||
%% | |||
%% Copyright <2013-2018> < |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this become 2019?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the same in other files. I can create a separate PR to update the date everywhere.
src/antidote_lock_server.erl
Outdated
read_write_process = spawn_link(fun() -> read_write_process(Self) end) | ||
}}. | ||
|
||
%%check_lock_state_process(Pid) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be deleted?
|
||
- *Dynamic Membership*: Adding and removing DCs is currently not supported. | ||
- *Fault tolerance*: In the following scenarios, the current implementation will not work correctly: | ||
- CRDT state cannot be updated locally: Implementation will wait for the update indefinitely. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this comment: Which CRDT state update is blocking here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a lock is updated I am using an CRDT update operation. This update might fail, e.g. if the partition with the lock is currently not available. There is no error handling for this case yet.
src/antidote_lock_server_state.erl
Outdated
{Actions, NewState}. | ||
|
||
|
||
%%% computes lock request actions for the locally waiting locks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still required?
Using |
This PR adds support for strongly consistent (serializable) transactions by using Locks.
Current status:
There is still one failing test case:
The
cluster_failure_test_2
sometimes fails. The test crashes a node holding the locks and then restarts it after some time. After the restart, another DC should be able to get the locks again, but the crashed DC sometimes is not able to read its CRDT state after restarting. I still have to debug this case - I am not yet sure if this is a problem with the lock implementation or a general problem in Antidote. Unfortunately, the bug occurs less frequently the more log messages I add for debugging.The rest of the implementation should be working.
Documentation is available in https://github.com/AntidoteDB/antidote/blob/strong-consistency-3/src/antidote_locks.md