-
Notifications
You must be signed in to change notification settings - Fork 10
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
Parallel increment on key #22
Comments
Is there any error messages in tarantool log file? Maybe it has become inconsistent? I think that I need to rewrite INC/DEC operation using CRDT with Upsert.
As i've guessed, you've setup client-side replication for Memcached? And for Tarantool you've set up server-side replication?
Why results are different there? I suppose it's because initial values are different? |
No error. When I get values from master one and master two, values are the same.
Server memcached without replication, Tarantool with replication master-master.
Yes, initial values are different. |
Hello.
OS: Centos 6.8 x86_64 with latest updates.
I have 2 node Tarantool 1.7.1.117 with master-master replication for testing and plugin memcached 0.1.0.
When I try at the same time the increment for a single key with two running script on two different masters, the first script updates the key on one master, another script updates the key on another master, I do not get the correct value of the key. It should be 2000000 and get for example 882 392 or 892 956.
PHP script:
$mc = new Memcache; $mc->pconnect("ip_master_1_or_2", 11211); $key = "COUNTER"; $mc->set($key, 1, 0, 7200); for($i=0;$i<1000000;$i++) { $mc->increment($key); }
I try this method with tarantool php client, and everything works correctly, the result: 2000000, and I try this method for Memcached, and everything works correctly, result: 200001.
The text was updated successfully, but these errors were encountered: