Skip to content

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
@tarasmadan tarasmadan force-pushed the clean_up_db branch 2 times, most recently from fd3271d to 006c88c Compare December 2, 2024 15:44
@tarasmadan
Copy link
Collaborator Author

tarasmadan commented Dec 2, 2024

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 to up to 15k "files" records. It requires min 15k mutations to delete it. Index mutations are also counted somehow (2-3-4x in the worst case for 1-2-3 indexes).
Positive side - the 80k limit was introduced last year. It was 40k before.

P.S. It looks good for the smaller operations where you can fit everything in a single transaction.
In our case it is hard to say whether it makes sense to change existing code.
There is a high probability merge_history session change will trigger the the cascaded deletion of more that 80k rows (file records, indexed and potentially syz-lang programs int the future).

@tarasmadan tarasmadan force-pushed the clean_up_db branch 2 times, most recently from cd89732 to df5148b Compare December 3, 2024 09:19
@tarasmadan tarasmadan requested a review from a-nogikh December 3, 2024 09:32
@tarasmadan
Copy link
Collaborator Author

ptal

@tarasmadan
Copy link
Collaborator Author

PTAL

@tarasmadan tarasmadan requested a review from a-nogikh December 5, 2024 09:10
@tarasmadan tarasmadan enabled auto-merge December 5, 2024 09:11
@tarasmadan tarasmadan force-pushed the clean_up_db branch 2 times, most recently from d9bb454 to 0d2c245 Compare December 5, 2024 09:30
Copy link
Member

@ramosian-glider ramosian-glider left a comment

Choose a reason for hiding this comment

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

LGTM in general

@tarasmadan tarasmadan added this pull request to the merge queue Dec 5, 2024
Merged via the queue into google:master with commit 6352fa4 Dec 5, 2024
17 checks passed
@tarasmadan tarasmadan deleted the clean_up_db branch December 5, 2024 13: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.

3 participants