Closed aditiharini closed 16 hours ago
Latest commit: 21b3ffcebd78df9233a587973b0328cbe5a32505
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
hub-monorepo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 2, 2024 3:21pm |
We've observed hub memory usage and disk reads spike over the last couple days. We'd like to put a size bound on
getAllMessagesBySyncIds
because it currently accepts an unlimited number of sync ids and could end up exhausting hub resources.Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewPR-Codex overview
This PR focuses on adding a request length limit for the
getAllMessagesBySyncIds
function in theserver.ts
file and refactoring the message retrieval logic insyncHealth.ts
to handle multiple requests efficiently.Detailed summary
syncIds
ingetAllMessagesBySyncIds
to enforce a maximum limit.syncHealth.ts
to accumulate messages from multiple requests intoallMessages
.