spy16 / delayq

DelayQ is a Go library that provides a performant, reliable, distributed delay-queue using Redis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lua script execution failed

wan9bo7 opened this issue · comments

-------------- keys ----------------
2022/03/01 16:17:47 [DEBUG] reaper-7 picking set 'delayq:{example}'
-------------- args ----------------
2022/03/01 16:17:47 [DEBUG] now: 1646122667
2022/03/01 16:17:47 [DEBUG] newScore: 1.646122757e+09
2022/03/01 16:17:47 [DEBUG] batchSz: 100

[ERROR] lua script execution failed: ERR Error running script (call to f_6c869c2480f78cb1964b95df8d00232921988351): @user_script:7: ERR value is not an integer or out of range

Woa. Thanks for reporting. Let me figure this out and get back. Must be a recent change that caused it.

Modify it so that it can run:
items = redis.call('ZRANGEBYSCORE', from_set, '-inf', max_priority, 'LIMIT', 0, limit)

During initialization, the default configuration should be put in front, otherwise the options set will not take effect

	var opt Options
	opt.setDefaults()
	if len(opts) > 0 {
		opt = opts[0]
	}

This should be fixed.

It's not the initialisation part. It was the command used to set the new score for items picked for processing. Instead of resetting the score, it was adding to current value (so some t + another t instead of a 𝛥t was becoming a large value and going out of range)

Refer 1a1bfbc