Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

perf: use a single query for notification target lookups#20574

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ethanndickson wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromethan/single-db-query-notifs

Conversation

@ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedOct 30, 2025
edited
Loading

Somewhat minor inefficiency in notifications I discovered during a scaletest where I was creating many users. OurGetUsers query filter for rbac roles uses the&& operator on arrays, which is the intersection of the two arrays. Despite that, we were making seperate DB queries for each role, and then collating the results. I didn't see any other instances of this.

The test changes are required as the order of outgoing notifications is now non-deterministic.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

@ethanndicksonethanndickson marked this pull request as ready for reviewOctober 30, 2025 03:37
require.Equal(t,firstUser.UserID,sent[3].UserID)
require.Contains(t,sent[3].Targets,member.ID)
require.Equal(t,member.Username,sent[3].Labels["deleted_account_name"])
ownerNotifications:=notifyEnq.Sent(func(n*notificationstest.FakeNotification)bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

comment above with sent[0] etc is now obsolete and inaccurate.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@spikecurtisspikecurtisspikecurtis approved these changes

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ethanndickson@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp