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 6 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 47.46544% with 114 lines in your changes missing coverage. Please review.

Project coverage is 42.14%. Comparing base (1ef62e9) to head (009d43b).

Files with missing lines Patch % Lines
packages/backend/src/core/NotificationService.ts 13.15% 66 Missing ⚠️
packages/backend/src/misc/bigint.ts 75.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/ulid.ts 75.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15277      +/-   ##
===========================================
+ Coverage    40.47%   42.14%   +1.67%     
===========================================
  Files         1568     1573       +5     
  Lines       199140   205095    +5955     
  Branches      3955     4030      +75     
===========================================
+ Hits         80592    86445    +5853     
- Misses      117943   118045     +102     
  Partials       605      605              

☔ 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