Firestore batch does not complete forever if it exceeds a certain number of jobs

Viewed 175
function writeBatch(buffer:Gallery[]):Promise<any>{
  const bat = firestore().batch()
  buffer.forEach(item=>{
    bat.set(item.id.getDocument(),item)
  })
  return bat.commit()
}

To speed up writing, I am updating the data in firestore using batch as in the code above.

However, if an average of 20,000 documents are created or updated in one runtime, subsequent batches never complete.

To solve this, I had to kill the client completely and then run it again.

This problem is occurring on both Android and NodeJS.

Is there anything I missed?

0 Answers
Related