FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Messaging targets subquery by fogelito · Pull Request #13263 · appwrite/appwrite · GitHub

Messaging targets subquery - #13263

Open
fogelito wants to merge 4 commits into
mainfrom
post-messaging-topics
Open

Messaging targets subquery #13263
fogelito wants to merge 4 commits into
mainfrom
post-messaging-topics

Conversation

Copy link
Copy Markdown
Contributor

What does this PR do?

(Provide a description of what this PR does and why it's needed.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

greptile-apps Bot commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR reduces the cost of resolving messaging-topic targets while preserving complete recipient delivery through paginated subscriber reads.

  • Caps the internal topic-target subquery at 25 records and narrows its projections and result limit.
  • Skips the topic-target decode filter where targets are not consumed, including topic listings, counter updates, deletion cleanup, and worker topic lookup.
  • Adds end-to-end assertions that the internal targets attribute is not exposed by topic API responses.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
app/controllers/api/messaging.php Skips the internal target subquery for topic listings and subscriber counter updates while retaining response behavior.
app/init/constants.php Reduces the synthesized topic-target lookup cap from one million subscribers to 25.
app/init/database/filters.php Projects only subscriber target IDs and explicitly bounds the subsequent target lookup.
src/Appwrite/Deletes/Targets.php Avoids materializing topic targets while decrementing counters during target cleanup.
src/Appwrite/Platform/Workers/Messaging.php Skips the bounded topic-target filter and continues streaming complete recipient sets through subscriber pagination.
tests/e2e/Services/Messaging/MessagingBase.php Verifies topic responses omit the internal targets field after listings, reads, and high-volume subscriber creation.

Reviews (4): Last reviewed commit: "skip filters" | Re-trigger Greptile

github-actions Bot commented Aug 18, 2026
edited
Loading

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → post-messaging-topics (after).

Metric Before After Change
🚀 Requests/sec 194.47 194.04 ⚪ -0.2%
⏱️ Latency P50 74.42 ms 74.32 ms ⚪ -0.1%
⏱️ Latency P95 250.11 ms 253.46 ms ⚪ +1.3%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 74.32 253.46 12,369 194.04 +3.35
Account 137.27 322.8 651 10.79 -8.6
TablesDB 71.29 233.1 6,727 107.82 +8.82
Storage 67.61 234.84 3,255 53.8 -5.79
Functions 115.44 320.85 1,736 29.32 +20.89

Top API waits (after)

API request Max wait (ms)
functions.variables.update 842.18
storage.buckets.delete 740.48
tablesdb.rows.get 722.19
functions.runtimes.list 702.56
tablesdb.rows.update 650.71

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL