fix(chart): PerUserDriveChart.update で userId が null のシステム所有ファイルをスキップ#17499
Merged
syuilo merged 2 commits intoJun 4, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #17499 +/- ##
===========================================
+ Coverage 15.21% 16.96% +1.75%
===========================================
Files 247 1160 +913
Lines 12360 39576 +27216
Branches 4196 11022 +6826
===========================================
+ Hits 1880 6714 +4834
- Misses 8203 26245 +18042
- Partials 2277 6617 +4340 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
このPRによるapi.jsonの差分 |
Contributor
Backend memory usage comparisonBefore GC
After GC
After Request
|
Member
|
🙏 |
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()自体が呼ばれない(他ユーザー所有ファイルの集計は従来通り)。影響