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(backend): fallback if sinceId is older than the oldest in cache when using FTT (#14061) #210

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

Sayamame-beans
Copy link

Cherry-picked from misskey-dev#14061 (8a9de08)

  • fix(backend): fallback if sinceId is older than the oldest in cache when using FTT

  • Update CHANGELOG.md

  • chore: fix description of test

What

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

… 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];
Copy link
Author

Choose a reason for hiding this comment

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

redisResultIdsが[]のとき、oldestNoteIdはundefined

Copy link

github-actions bot commented Jul 7, 2024

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

差分はこちら

Get diff files from Workflow Page


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);
Copy link
Author

Choose a reason for hiding this comment

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

String < undefinedの比較はfalse

Copy link
Collaborator

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 &&取ったほうがいいかもね。

Copy link
Collaborator

@anatawa12 anatawa12 left a comment

Choose a reason for hiding this comment

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

よさそう。

@Sayamame-beans
Copy link
Author

とりあえずマージしてリリースします?(忘れてた)

@anatawa12
Copy link
Collaborator

してよさそう

@Sayamame-beans Sayamame-beans merged commit 868fa8e into develop Jul 10, 2024
23 checks passed
@Sayamame-beans Sayamame-beans deleted the pick-14061 branch July 10, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants