Skip to content

Parse.Object.saveAll can result in duplicate objects #859

Open
@simonaberry

Description

@simonaberry

New Issue Checklist

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

Watch this Loom

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions