-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
perf(backend): Improve performance of FetchInstanceMetadata #11128
perf(backend): Improve performance of FetchInstanceMetadata #11128
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #11128 +/- ##
===========================================
+ Coverage 77.36% 77.81% +0.45%
===========================================
Files 908 171 -737
Lines 91662 21487 -70175
Branches 7551 498 -7053
===========================================
- Hits 70916 16721 -54195
+ Misses 20746 4766 -15980 |
テスト欲しくなってきたわね |
連合のテストやパフォーマンスのテストが結構やっかいなのですよね。 |
パフォーマンスのテストはそこまで重要じゃないと思っていて、このPRでいえば「ロックを取得できなかった場合にリトライするのをやめ、何もしないようになった」ことを担保するテストがあると良いかなと思った |
redisClientのモックを作ればそういうこともやりやすいかも。 |
@yuriha-chan 失礼ですが、エディタは何を使われていますか? |
vimだけど設定に無頓着なせいで劣悪な環境で書いていたりしています |
VS Codeを使ってくださいね。 |
ぐぬぬ… |
…com/yuriha-chan/misskey into pr/yuriha-chan/11128
(なんかもう全然ダメダメで笑うしかなくなった) |
…com/yuriha-chan/misskey into pr/yuriha-chan/11128
👍 👍👍👍 |
* Perf: Avoid retries to acquire lock in fetchInstanceMetadata * Fix * Add Changelog * Fix typo * Fix lint * 記法をMisskey式にする * ???? * refactor misskey-dev#11128 (review) * refactor * getいらない? * fix * fix * Update CHANGELOG.md * clean up --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
…dev#11128) * Perf: Avoid retries to acquire lock in fetchInstanceMetadata * Fix * Add Changelog * Fix typo * Fix lint * 記法をMisskey式にする * ???? * refactor misskey-dev#11128 (review) * refactor * getいらない? * fix * fix * Update CHANGELOG.md * clean up --------- Co-authored-by: tamaina <tamaina@hotmail.co.jp>
#11000
What
Why
FetchInstanceMetadata は Deliver Jobから呼ばれるため高速大量に呼ばれるため、これを改めることでパフォーマンスが顕著に改善する。
Additional info (optional)
以下の動作を確認しました。
redis-lockにリトライを設定するオプションがなかったので、Redis上にロックとして使うキーを設定し、これをアトミックに参照・書き換える実装とした。
Checklist