Skip to content

Cap Mongo connection pools and index dailyEvents by groupHash#659

Open
Kuchizu wants to merge 3 commits into
masterfrom
perf/mongo-optimizations
Open

Cap Mongo connection pools and index dailyEvents by groupHash#659
Kuchizu wants to merge 3 commits into
masterfrom
perf/mongo-optimizations

Conversation

@Kuchizu

@Kuchizu Kuchizu commented Jul 3, 2026

Copy link
Copy Markdown
Member

Set appName, maxPoolSize and maxIdleTimeMS on both Mongo clients
Create {groupHash:1} index on dailyEvents of new projects

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens MongoDB client connection behavior to avoid excessive socket usage and adds an index to improve lookups on dailyEvents by groupHash for newly created projects.

Changes:

  • Add MongoDB client options: appName, maxPoolSize, and maxIdleTimeMS for both Hawk and Events clients.
  • Create a { groupHash: 1 } index on each new project’s dailyEvents collection.
  • Bump package version from 1.5.3 to 1.5.4.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/resolvers/project.js Adds { groupHash: 1 } index creation for new projects’ dailyEvents:* collections.
src/mongo.ts Applies appName, pool size cap, and idle socket timeout to MongoDB client connections.
package.json Version bump to 1.5.4.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mongo.ts
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.

3 participants