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

feat: add index on events for faster revision id #6170

Merged
merged 3 commits into from
Feb 8, 2024
Merged

Conversation

sjaanus
Copy link
Contributor

@sjaanus sjaanus commented Feb 8, 2024

On all pods and instances, we run the same revision update query every second. It is relatively fast when the application has started. This is the single most ran query in unleash.
Benchmarks:

  1. Running pod with existing revisionID:
  • old 5.5ms
  • new 0.028ms
  1. New pod without existing revisionID
  • old 9.329ms
  • new 0.033ms

This query is getting optimized

async getMaxRevisionId(largerThan: number = 0): Promise<number> {

Copy link

vercel bot commented Feb 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 8, 2024 0:09am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ⬜️ Ignored (Inspect) Visit Preview Feb 8, 2024 0:09am

Copy link
Contributor

@gardleopard gardleopard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. LGTM

@sjaanus sjaanus merged commit ecc200b into main Feb 8, 2024
9 checks passed
@sjaanus sjaanus deleted the index-events-feature branch February 8, 2024 12:11
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.

3 participants