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

mysql 5.7 でdeadlockが発生 #630 #1124

Merged
merged 3 commits into from
Jan 8, 2025
Merged

mysql 5.7 でdeadlockが発生 #630 #1124

merged 3 commits into from
Jan 8, 2025

Conversation

seasoftjapan
Copy link
Contributor

  • トランザクション分離レベルを意識して、無駄な SQL 実行を避ける。mysql 5.7 でdeadlockが発生 #630 (comment)
  • 実行コストが幾らか低い傾向の exists() を使う。mysql 5.7 でdeadlockが発生 #630 (comment)
  • SC_DB_DBFactory のテストが無さそうなので、今回追加したメソッドの他、ごく基本的な部分を実装する。
  • 削除件数を返さない不具合を修正。
  • アノテーションを補完。

- トランザクション分離レベルを意識して、無駄な SQL 実行を避ける。#630 (comment)
- 実行コストが幾らか低い傾向の exists() を使う。#630 (comment)
- SC_DB_DBFactory のテストが無さそうなので、今回追加したメソッドの他、ごく基本的な部分を実装する。
- 削除件数を返さない不具合を修正。
- アノテーションを補完。
@seasoftjapan seasoftjapan added this to the 2.18(仮) milestone Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 49.94%. Comparing base (55353cf) to head (24855f2).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
data/class/SC_Query.php 25.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1124      +/-   ##
==========================================
- Coverage   50.62%   49.94%   -0.69%     
==========================================
  Files          80       82       +2     
  Lines       10263    10480     +217     
==========================================
+ Hits         5196     5234      +38     
- Misses       5067     5246     +179     
Flag Coverage Δ
tests 49.94% <75.00%> (-0.69%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seasoftjapan seasoftjapan enabled auto-merge January 7, 2025 14:43
Copy link
Contributor

@nanasess nanasess left a comment

Choose a reason for hiding this comment

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

LGTM

@seasoftjapan seasoftjapan merged commit 23abd7a into master Jan 8, 2025
213 of 214 checks passed
@nobuhiko
Copy link
Contributor

nobuhiko commented Jan 8, 2025

ちなみにmysql5.7で単純に1万回実行してパフォーマンス比較したら若干劣化してましたよ

@seasoftjapan
Copy link
Contributor Author

@nobuhiko MySQL は、若干そうなるはずです。シナリオ次第で、PostgrteSQL で実際に削除されるケースでは、概ね2倍のパフォーマンスでした。

@seasoftjapan seasoftjapan deleted the seasoft-630 branch January 8, 2025 01:16
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