Skip to content

Commit

Permalink
reversed history fix for meta keys with epoch only
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Nov 2, 2023
1 parent 1baf9f6 commit 61992de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/redis_lua/broker_history_list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ if current_epoch == false then
redis.call("hset", meta_key, "e", current_epoch, "s", "0")
end

if top_offset == false then
top_offset = 0
end

if meta_expire ~= '0' then
redis.call("expire", meta_key, meta_expire)
end
Expand Down
4 changes: 4 additions & 0 deletions internal/redis_lua/broker_history_stream.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if current_epoch == false then
redis.call("hset", meta_key, "e", current_epoch, "s", "0")
end

if top_offset == false then
top_offset = 0
end

if meta_expire ~= '0' then
redis.call("expire", meta_key, meta_expire)
end
Expand Down

0 comments on commit 61992de

Please sign in to comment.