Skip to content

perf: optimization to redis for leader follower setup #796

Merged
kant777 merged 2 commits intomainfrom
redis-opt
Sep 19, 2025
Merged

perf: optimization to redis for leader follower setup #796
kant777 merged 2 commits intomainfrom
redis-opt

Conversation

@shaspitz
Copy link
Copy Markdown
Contributor

@shaspitz shaspitz commented Sep 18, 2025

Improves upon #793 by:

  • Added a string index for O(1) retrieval of the latest height
  • Wrapped payload writes in a single atomic Lua scrip
  • Left GetPayloadsSince as O(log n) and did not optimize GetPayloadByHeight, since it’s only used by legacy code
  • Tests are untouched as function behavior shouldn't have changed

@shaspitz shaspitz marked this pull request as ready for review September 18, 2025 21:26
@kant777 kant777 merged commit 16cecf1 into main Sep 19, 2025
11 checks passed
@kant777 kant777 deleted the redis-opt branch September 19, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants