-
Notifications
You must be signed in to change notification settings - Fork 1
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(backend): fallback if sinceId
is older than the oldest in cache when using FTT (#14061)
#210
Conversation
… when using FTT (misskey-dev#14061) * fix(backend): fallback if `sinceId` is older than the oldest in cache when using FTT * Update CHANGELOG.md * chore: fix description of test
|
||
shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); | ||
const oldestNoteId = ascending ? redisResultIds[0] : redisResultIds[redisResultIds.length - 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redisResultIds
が[]のとき、oldestNoteIdはundefined
このPRによるapi.jsonの差分 差分はこちら |
|
||
shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); | ||
const oldestNoteId = ascending ? redisResultIds[0] : redisResultIds[redisResultIds.length - 1]; | ||
shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0) || (ps.sinceId != null && ps.sinceId < oldestNoteId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String < undefinedの比較はfalse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstreamの問題 && 家のサーバーで問題にならないからいいけどここの(ps.sinceId != null && ps.sinceId < oldestNoteId)
はps.useDbFallback &&
取ったほうがいいかもね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よさそう。
とりあえずマージしてリリースします?(忘れてた) |
してよさそう |
Cherry-picked from misskey-dev#14061 (8a9de08)
fix(backend): fallback if
sinceId
is older than the oldest in cache when using FTTUpdate CHANGELOG.md
chore: fix description of test
What
Why
Additional info (optional)
Checklist