Reputation: 193
doing a R/W test with redis cluster (servers): 1 master + 2 slaves. the following is the key WRITE code:
var trans = redisDatabase.CreateTransaction();
Task<bool> setResult = trans.StringSetAsync(key, serializedValue, TimeSpan.FromSeconds(10));
Task<RedisResult> waitResult = trans.ExecuteAsync("wait", 3, 10000);
trans.Execute();
trans.WaitAll(setResult, waitResult);
using the following as the connection string:
[server1 ip]:6379,[server2 ip]:6379,[server3 ip]:6379,ssl=False,abortConnect=False
running 100 threads which do 1000 loops of the following steps:
running this test a few times generates several errors - trying to understand why as the "wait" with (10 seconds!) operation should have guaranteed the write to all slaves before returning.
Any idea?
Upvotes: 1
Views: 474
Reputation: 1
What about improving consistency guarantees, by adding in some "check, write, read" iterations?
Won't be perfect but it should reduce probability of losing a SET??
Upvotes: 0
Reputation: 50112
WAIT
isn't supported by SE.Redis as explained by its prolific author at Stackexchange.redis lacks the "WAIT" support
Upvotes: 1