parse-community / parse-community/docs
Parse.Object.saveAll can result in duplicate objects
Nobody has claimed this yet.
- Dominant language
- SCSS
- Stars
- 317
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest versions of Parse Server and the Parse JS SDK.
Issue Description
this issue has been specifically created to reference in this PR
Parse.Object.saveAll uses the /batch endpoint
if you have a large batch of large objects that are being saved via saveAll, and the network quality is very slow, it can happen that the initial request times out, and will therefore be automatically retried. However, some of the objects in the first batch may have already been successfully saved - but then the second retry would result in duplicate objects being created.
Steps to reproduce
Actual Outcome
duplicate objects created
Expected Outcome
no duplicate objects
Environment
JS SDK used in web client, over spotty networks
Server
- Parse Server version:
any - Operating system:
browser - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
remote
Database
- System (MongoDB or Postgres):
mongo - Database version:
any - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
remote
Client
- Parse JS SDK version:
latest
Logs
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Parse.Object.saveAll and its /batch requests, then review the referenced Parse JS SDK pull request #1432 and the linked reproduction video. Done means retries on slow networks no longer create duplicate objects; the issue names no source files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100