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

fix: clean api #333

Merged
merged 1 commit into from
Aug 7, 2023
Merged

fix: clean api #333

merged 1 commit into from
Aug 7, 2023

Conversation

gassara-kys
Copy link
Collaborator

@gassara-kys gassara-kys commented Aug 7, 2023

delete文でデータ一括削除を行う実装でしたが、テーブルのデータ量が多い場合に長時間かつ広範囲にテーブルをロックしてしまい、他のDB更新系のAPIに影響が出てしまう事象を確認しました。

ロック状態を回避するために削除対象のIDをselectしてからPK指定でdeleteする形式に変更したいです。

Copy link
Contributor

@iiiidaaa iiiidaaa left a comment

Choose a reason for hiding this comment

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

LGTM

@gassara-kys gassara-kys merged commit cd5253e into master Aug 7, 2023
@gassara-kys gassara-kys deleted the fix-clean-api branch August 7, 2023 03:40
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