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

Migrate RenameObject to raw SQL #1236

Merged
merged 7 commits into from
May 21, 2024
Merged

Conversation

ChrisSchinnerl
Copy link
Member

This is the first method migrated to the new raw sql database type. Starting with a smaller one to keep things easy.

NOTE: DeleteObject is different for SQLite and MySQL on purpose. SQLite is less granular when it comes to locking so in my experience performing the writing operation sooner rather than later in the txn reduces the frequency of locking errors.

MySQL on the other hand seemed to benefit from reading the value first to avoid the optimistic locking MySQL performs in the common case.

I'm sure now that we keep these implementations separate we will find many more spots where reorganising queries within transactions will help us improve performance for individual database engines.

@ChrisSchinnerl ChrisSchinnerl self-assigned this May 16, 2024
Base automatically changed from chris/directories-table to dev May 16, 2024 13:00
@ChrisSchinnerl ChrisSchinnerl marked this pull request as ready for review May 16, 2024 13:01
stores/sql/sqlite/main.go Outdated Show resolved Hide resolved
@ChrisSchinnerl ChrisSchinnerl merged commit 66d667d into dev May 21, 2024
7 checks passed
@ChrisSchinnerl ChrisSchinnerl deleted the chris/rename-object-migration branch May 21, 2024 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants