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

Sort logs by ID instead of task_finished. Add customizable limit. #120

Merged
merged 1 commit into from
Jul 13, 2024

Conversation

geirsagberg
Copy link
Collaborator

When the log table grows to millions of logs, the current strategy of fetching (and caching) all logs becomes untenable.

By adding an optional limit, users can configure a cutoff for how many logs should be fetched.

Note that the cache might still grow very large, this is not addressed in this PR.

Also, the sorting can be optimized by sorting by ID instead of task_finished, as the ID is a snowflake with the exact same order as task_finished, but can use the PK index.

@geirsagberg geirsagberg merged commit 6b12a14 into main Jul 13, 2024
5 checks passed
@geirsagberg geirsagberg deleted the sort-by-id-add-limit branch July 13, 2024 08:55
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.

1 participant