parse-community / parse-community/parse-server

Session Lookup should use indexes

Open
#8,290 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Issue Checklist
Issue Description

There are no indexes created the _Session class. This means that the default index of _id is used when session tokens are looked up

Steps to reproduce

Create a new user.

Actual Outcome

No indexes are created. An index on _session_token could increase the performance of session lookups

Expected Outcome

Parse Server should use hint / indexes when looking up session tokens

Environment

Server

  • Parse Server version: 5.3.0
  • Operating system: macos
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): localhost

Database

  • System (MongoDB or Postgres): mongo
  • Database version: 5.0
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): atlas

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): js
  • SDK version: 3.5.0
Logs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Session Lookup path and the MongoDB setup for the _Session class. Check how session tokens are queried and which indexes are created or used. Done means session-token lookups use an appropriate index and the behavior is verified against the reported MongoDB case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, mongodb, nodejs
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.