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: 通知のページネーションで2つ以上読み込めなくなることがある問題 #15277

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

anatawa12
Copy link
Member

What

Fix #15259

Why

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Comment on lines +158 to 163
// TODO: 同一ミリ秒に生成されたときにランダム部分が昇順じゃなくてXADDが失敗する可能性があるのでid再生成しながらリトライするべきかも。またはidをRedisの生成したものから生成するようにする。
const redisIdPromise = this.redisClient.xadd(
`notificationTimeline:${notifieeId}`,
'MAXLEN', '~', this.config.perUserNotificationsMaxCount.toString(),
'*',
this.toXListId(notification.id),
'data', JSON.stringify(notification));
Copy link
Member Author

Choose a reason for hiding this comment

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

現状ではmisskeyの生成したidに揃えてますが、どっちかというとXADDしたレスポンスのidをもとにmisskeyのidを生成した方が良い機はしています。

その場合ランダムパートがランダムではなくシーケンシャルになりますが

@github-actions github-actions bot added the packages/backend Server side specific issue/PR label Jan 14, 2025
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 29.95392% with 152 lines in your changes missing coverage. Please review.

Project coverage is 41.14%. Comparing base (b161601) to head (dd08aa5).
Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
packages/backend/src/core/NotificationService.ts 6.57% 71 Missing ⚠️
packages/backend/src/misc/bigint.ts 27.50% 29 Missing ⚠️
packages/backend/src/core/IdService.ts 50.00% 10 Missing ⚠️
...rc/server/api/endpoints/i/notifications-grouped.ts 50.00% 8 Missing ⚠️
...ackend/src/server/api/endpoints/i/notifications.ts 0.00% 7 Missing ⚠️
packages/backend/src/misc/id/meid.ts 44.44% 5 Missing ⚠️
packages/backend/src/misc/id/meidg.ts 44.44% 5 Missing ⚠️
packages/backend/src/misc/id/object-id.ts 44.44% 5 Missing ⚠️
packages/backend/src/misc/id/aid.ts 42.85% 4 Missing ⚠️
packages/backend/src/misc/id/aidx.ts 50.00% 4 Missing ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15277      +/-   ##
===========================================
+ Coverage    40.32%   41.14%   +0.82%     
===========================================
  Files         1564     1571       +7     
  Lines       198081   204764    +6683     
  Branches      3841     3670     -171     
===========================================
+ Hits         79870    84259    +4389     
- Misses      117640   119934    +2294     
  Partials       571      571              

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

Copy link
Contributor

github-actions bot commented Jan 14, 2025

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -47470,8 +47470,6 @@
                         "login",
                         "app",
                         "test",
-                        "reaction:grouped",
-                        "renote:grouped",
                         "pollVote",
                         "groupInvited"
                       ]
@@ -47498,8 +47496,6 @@
                         "login",
                         "app",
                         "test",
-                        "reaction:grouped",
-                        "renote:grouped",
                         "pollVote",
                         "groupInvited"
                       ]

Get diff files from Workflow Page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/misskey-js
Projects
1 participant