Hi,
Sporadically, Redis fails executing following Lua script:
var newDeadlineDouble = newDeadline.UtcDateTime.ToOADate();
var timeoutslist = someRedisSortedSetkey;
double score = some_score_from_querying_above_sortedset;
double scoremin = score - 0.000000000004; // double number encoding/parsing produces some inconsistencies requiring a range for comparison
double scoremax = score + 0.000000000004;
var id = somerediskey;
var script = "local score = tonumber(redis.call('zscore', '" + timeoutslist + "', KEYS[1]))\n" +
"if score > tonumber(ARGV[1]) and score < tonumber(ARGV[2]) then redis.call('zadd', '" + timeoutslist + "', ARGV[3], KEYS[1]) return redis.call('hgetall', KEYS[2]) end";
var task = db.ScriptEvaluateAsync(script, new RedisKey[] { id, id }, new RedisValue[] { scoremin, scoremax, newDeadlineDouble });
await task.ConfigureAwait(false);
Exception:
StackExchange.Redis.RedisServerException: ERR Error running script (call to f_2bb5d9f8f933748c46de66a1b175e89c339533e5): @user_script:2: user_script:2: attempt to compare number with nil
I don’t see how any comparison could run into nil.
Is this a known issue?
Any suggestions for a workaround, please?
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.