forked from misskey-dev/misskey
-
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
Pick redis push tl #75
Merged
Merged
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
aa2f87b
enhance(backend): RedisへのTLの構築をListで行うように
syuilo d5a04b0
fix of 0bb0c32908
syuilo 23ec972
fix of 0bb0c32908
syuilo c941eae
feat: improve tl performance (#11946) (only updating redis TL)
anatawa12 c74fff1
enhance: TLキャッシュ容量を設定できるように
syuilo 0c8e019
fix: type error (merge miss)
anatawa12 70f3984
enhance(backend): UserListMembershipにユーザーリストの作成者IDを非正規化
anatawa12 0f55162
fix: antenna become not working
anatawa12 a3cfff3
Revert "enhance: TLキャッシュ容量を設定できるように"
anatawa12 f4daa12
chore: revert configurable TL length
anatawa12 ab3c018
enhance: ローカルタイムライン、ソーシャルタイムラインで返信を含むかどうか設定可能に (redis更新のみ)
syuilo 7a0125f
revert: adding withReplies, isHibernated, redisForTimelines, and user…
anatawa12 d8547d9
revert: deny RN of direct note
anatawa12 f10e159
revert: Renote Count
anatawa12 3646db8
fix: old roleTimeline not updated
anatawa12 fefdb4b
fix: withReplies remains in UserListJoining
anatawa12 d1dab2e
chore: use JOIN instead of Denormalized fields
anatawa12 27c9cbc
chore: remove userListUserId Denormalized field from MiUserListJoining
anatawa12 0864a99
fix: style
anatawa12 73cd4bd
fix: usage of userListUserId remains
anatawa12 690d4a5
pick フォローしているユーザーからの自分の投稿への返信がタイムラインに含まれない問題を修正
anatawa12 2389799
Merge branch 'develop' into pick-redis-push-tl
anatawa12 dc024b4
docs(changelog): 2023.10.x向けのTLを内部的に構築するようになりました
anatawa12 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and other misskey contributors | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class WithReplies1696222183852 { | ||
name = 'WithReplies1696222183852' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "following" ADD "withReplies" boolean NOT NULL DEFAULT false`); | ||
await queryRunner.query(`ALTER TABLE "user_list_joining" ADD "withReplies" boolean NOT NULL DEFAULT true`); | ||
await queryRunner.query(`CREATE INDEX "IDX_d74d8ab5efa7e3bb82825c0fa2" ON "following" ("followeeId", "followerHost") `); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`DROP INDEX "public"."IDX_d74d8ab5efa7e3bb82825c0fa2"`); | ||
await queryRunner.query(`ALTER TABLE "user_list_joining" DROP COLUMN "withReplies"`); | ||
await queryRunner.query(`ALTER TABLE "following" DROP COLUMN "withReplies"`); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/backend/migration/1696323464251-user-list-membership.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export class UserListMembership1696323464251 { | ||
name = 'UserListMembership1696323464251' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_joining" RENAME TO "user_list_membership"`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_membership" RENAME TO "user_list_joining"`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export class Hibernation1696331570827 { | ||
name = 'Hibernation1696331570827' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`DROP INDEX "public"."IDX_d74d8ab5efa7e3bb82825c0fa2"`); | ||
await queryRunner.query(`ALTER TABLE "user" ADD "isHibernated" boolean NOT NULL DEFAULT false`); | ||
await queryRunner.query(`ALTER TABLE "following" ADD "isFollowerHibernated" boolean NOT NULL DEFAULT false`); | ||
await queryRunner.query(`CREATE INDEX "IDX_ce62b50d882d4e9dee10ad0d2f" ON "following" ("followeeId", "followerHost", "isFollowerHibernated") `); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`DROP INDEX "public"."IDX_ce62b50d882d4e9dee10ad0d2f"`); | ||
await queryRunner.query(`ALTER TABLE "following" DROP COLUMN "isFollowerHibernated"`); | ||
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "isHibernated"`); | ||
await queryRunner.query(`CREATE INDEX "IDX_d74d8ab5efa7e3bb82825c0fa2" ON "following" ("followeeId", "followerHost") `); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/backend/migration/1696807733453-userListUserId.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
/* | ||
* SPDX-FileCopyrightText: syuilo and other misskey contributors | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class UserListUserId1696807733453 { | ||
name = 'UserListUserId1696807733453' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_membership" ADD "userListUserId" character varying(32) NOT NULL DEFAULT ''`); | ||
const memberships = await queryRunner.query(`SELECT "id", "userListId" FROM "user_list_membership"`); | ||
anatawa12 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
for(let i = 0; i < memberships.length; i++) { | ||
const userList = await queryRunner.query(`SELECT "userId" FROM "user_list" WHERE "id" = $1`, [memberships[i].userListId]); | ||
await queryRunner.query(`UPDATE "user_list_membership" SET "userListUserId" = $1 WHERE "id" = $2`, [userList[0].userId, memberships[i].id]); | ||
} | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_membership" DROP COLUMN "userListUserId"`); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/backend/migration/1696808725134-userListUserId-2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and other misskey contributors | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export class UserListUserId21696808725134 { | ||
name = 'UserListUserId21696808725134' | ||
|
||
async up(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_membership" ALTER COLUMN "userListUserId" DROP DEFAULT`); | ||
} | ||
|
||
async down(queryRunner) { | ||
await queryRunner.query(`ALTER TABLE "user_list_membership" ALTER COLUMN "userListUserId" SET DEFAULT ''`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
まだここのdefault値で悩んでます。なんか切り替える機能を実装するしかないかな