fix(chart): PerUserDriveChart.update で userId が null のシステム所有ファイルをスキップ#17499
Open
sasagar wants to merge 1 commit into
Open
fix(chart): PerUserDriveChart.update で userId が null のシステム所有ファイルをスキップ#17499sasagar wants to merge 1 commit into
sasagar wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #17499 +/- ##
===========================================
+ Coverage 15.27% 24.99% +9.71%
===========================================
Files 247 1158 +911
Lines 12338 39431 +27093
Branches 4178 10973 +6795
===========================================
+ Hits 1885 9854 +7969
- Misses 8188 23700 +15512
- Partials 2265 5877 +3612 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
|
このPRによるapi.jsonの差分 |
Contributor
Backend memory usage comparisonBefore GC
After GC
After Request
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #17498
概要
PerUserDriveChart.update(file, isAdditional)がChart.commit()のgroup引数としてfile.userIdをそのまま渡しているため、MiDriveFile.userIdがnullのファイル(インスタンスアイコン/バナー、admin エンドポイント経由のカスタム絵文字画像アップロード、フェッチされたシステムアバター等のシステム所有ファイル)に対する更新で、__chart__per_user_drive.groupのvarchar(128) NOT NULL制約違反となりChartManagementServiceの保存タイマーから例外が出ていました。変更内容
update()の冒頭でfile.userId == nullの場合は早期 return(no-op)。CHANGELOG.md
Unreleased > Server に追記しています。
動作確認
__chart__per_user_driveへのINSERT時にnull value in column "group"で例外。file.userId == nullの入力は事前にスキップされ、commit()自体が呼ばれない(他ユーザー所有ファイルの集計は従来通り)。影響