You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have a synchronous method which does the following -
var transaction = _connectionMultiplexer.GetDatabase(0).CreateTransaction();
var returnValueTask = transaction.HashSetAsync(key, KeyValuePairsToHashEntries(keyValuePairs));
transaction.KeyExpireAsync(key, expiry);
var success = transaction.Commit();
if (!success) throw new Exception("transaction failed");
return returnValueTask.Result;
I've load tested it locally (100 threads doing the same to either the same key or different keys ) everything seems to be working fine,
but we've seen in production env that pretty frequently the transactions don't seem to complete ( or take very long to complete ).
Am I doing something wrong in the code ? ( other than the method being synchronous which is a prerequisite ).
Could you suggest an alternative to simulate atomic writing of both the hash and the expiry ?
Thanks in advance !
The text was updated successfully, but these errors were encountered:
Hello,
I have a synchronous method which does the following -
var transaction = _connectionMultiplexer.GetDatabase(0).CreateTransaction();
var returnValueTask = transaction.HashSetAsync(key, KeyValuePairsToHashEntries(keyValuePairs));
transaction.KeyExpireAsync(key, expiry);
var success = transaction.Commit();
if (!success) throw new Exception("transaction failed");
return returnValueTask.Result;
I've load tested it locally (100 threads doing the same to either the same key or different keys ) everything seems to be working fine,
but we've seen in production env that pretty frequently the transactions don't seem to complete ( or take very long to complete ).
Am I doing something wrong in the code ? ( other than the method being synchronous which is a prerequisite ).
Could you suggest an alternative to simulate atomic writing of both the hash and the expiry ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: