Skip to content
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

Reintroduce fix(redis-lua): compatibility with dragonfly and lua 5.4 #78309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/scripts/digests/digests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ local configuration_argument_parser = object_argument_parser({
{"ttl", argument_parser(tonumber)},
{"timestamp", argument_parser(tonumber)},
}, function (configuration)
math.randomseed(configuration.timestamp)
math.randomseed(math.floor(configuration.timestamp))

function configuration:get_schedule_waiting_key()
return string.format('%s:s:w', self.namespace)
Expand Down
6 changes: 5 additions & 1 deletion src/sentry/scripts/similarity/index.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ This is modeled as two data structures:
-- greater. This is wrapped in `pcall` so that we can continue to support older
-- Redis versions while using this feature if it's available.
if not pcall(redis.replicate_commands) then
redis.log(redis.LOG_DEBUG, 'Could not enable script effects replication.')
if redis.log == nil then
print('Could not enable script effects replication.')
else
redis.log(redis.LOG_DEBUG, 'Could not enable script effects replication.')
end
end


Expand Down
Loading