Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect Firestore commit write limits #12111

Merged
merged 2 commits into from
Apr 21, 2022
Merged

Conversation

rosstimothy
Copy link
Contributor

Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and committing multiple times until all documents have been removed.

Fixes #12007

Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007
@rosstimothy rosstimothy marked this pull request as ready for review April 20, 2022 14:13
@github-actions github-actions bot requested review from smallinsky and Tener April 20, 2022 14:13
@rosstimothy rosstimothy merged commit b543b99 into master Apr 21, 2022
@rosstimothy rosstimothy deleted the tross/firestore_batch_commit branch April 21, 2022 14:25
rosstimothy added a commit that referenced this pull request Apr 22, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)

# Conflicts:
#	lib/backend/firestore/firestorebk_test.go
rosstimothy added a commit that referenced this pull request Apr 22, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)

# Conflicts:
#	lib/backend/firestore/firestorebk_test.go
rosstimothy added a commit that referenced this pull request Apr 22, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)
@rosstimothy
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
branch/v7
branch/v8
branch/v9

Questions ?

Please refer to the Backport tool documentation

r0mant pushed a commit that referenced this pull request Apr 22, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)
rosstimothy added a commit that referenced this pull request Apr 25, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)

# Conflicts:
#	lib/backend/firestore/firestorebk_test.go
rosstimothy added a commit that referenced this pull request Apr 25, 2022
Firestore only allows 500 writes per commit. Prior to this change
DeleteRange or purgeExpiredDocuments could result in deleting
more than 500 documents and would result in an error. To comply with
the limits both DeletRange and purgeExpiredDocuments now call
deleteDocuments which properly handles limiting a batch to 500 writes
and commiting multiple times until all documents have been removed.

Fixes #12007

(cherry picked from commit b543b99)

# Conflicts:
#	lib/backend/firestore/firestorebk_test.go
@webvictim webvictim mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maximum allowed writes exceeded in Firestore Commit
3 participants