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

Track db versions count #310

Closed
wants to merge 24 commits into from
Closed

Conversation

jeromegn
Copy link
Contributor

@jeromegn jeromegn commented Aug 4, 2023

Fixes #301

Creates a new table crsql_db_versions_total where the total number of changes per db version is tracked. This allows for our in-memory cache to be purged and therefore resources to be released.

It creates 1 extra trigger per insert/update/delete per crr-tracked table and 1 "global" trigger that cleans up the table when the total count of db versions reaches zero to keep it lean.

tantaman and others added 20 commits August 3, 2023 15:32
For some reason we create sentinels on merge
@jeromegn jeromegn marked this pull request as ready for review August 5, 2023 16:52
@tantaman
Copy link
Collaborator

tantaman commented Aug 6, 2023

all those merge commits 😅

I've cleaned up the history and opened a new pr with your changes -- #313

@jeromegn
Copy link
Contributor Author

jeromegn commented Aug 7, 2023

I decided to use the clock tables directly in my queries in my program. This circumvents the performance regression explained in #313

Closing for now!

@jeromegn jeromegn closed this Aug 7, 2023
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.

Detecting "dead" db versions
2 participants