Skip to content

Commit

Permalink
fix redis error (zeromicro#88)
Browse files Browse the repository at this point in the history
Co-authored-by: dylan <[email protected]>
  • Loading branch information
dylanNew and dylan authored Sep 21, 2020
1 parent b6b8941 commit 3e7e466
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/bloom/bloom.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ const (
// maps as k in the error rate table
maps = 14
setScript = `
local key = KEYS[1]
for _, offset in ipairs(ARGV) do
redis.call("setbit", key, offset, 1)
redis.call("setbit", KEYS[1], offset, 1)
end
`
testScript = `
local key = KEYS[1]
for _, offset in ipairs(ARGV) do
if tonumber(redis.call("getbit", key, offset)) == 0 then
if tonumber(redis.call("getbit", KEYS[1], offset)) == 0 then
return false
end
end
Expand Down

0 comments on commit 3e7e466

Please sign in to comment.