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

dashboard/app: periodically remove coverage garbage from spanner #5550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tarasmadan
Copy link
Collaborator

No description provided.

@tarasmadan tarasmadan force-pushed the clean_up_db branch 7 times, most recently from 5fd8685 to a18a545 Compare December 2, 2024 10:02
@tarasmadan tarasmadan marked this pull request as ready for review December 2, 2024 10:02
//
// deleteGarbageSession returns the deleted rows count.
// (0, nil) means there is no data to delete.
func deleteGarbageSession(ctx context.Context) (int64, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

That might better belong to pkg/coveragedb.

@tarasmadan
Copy link
Collaborator Author

https://cloud.google.com/spanner/docs/foreign-keys/overview#how-to-define-foreign-key-action may be a better way to go.
Spanner allows to auto-delete referenced data.
Potential problem - what if the referenced data requires >80k mutations?
Currently 1 "merge_history" record points up to 15k "files" records. It requires min 15k mutations to delete it. Index mutataions are also counted somehow (2x in the worst case).
Positive side - the 80k limit was introduced last year. It was 40k before.

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