-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Maximum allowed writes exceeded in Firestore Commit #12007
Labels
Comments
rosstimothy
added a commit
that referenced
this issue
Apr 20, 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
rosstimothy
added a commit
that referenced
this issue
Apr 21, 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
@rosstimothy, thank you for taking the time to fix this issue. Very much appreciated! Would it be possible to have this backported to v7 or v8? |
rosstimothy
added a commit
that referenced
this issue
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 issue
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 issue
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)
Backport PRs are now up for v7, v8, v9. Sorry I was a bit busy and didn't get to this yesterday. |
r0mant
pushed a commit
that referenced
this issue
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 issue
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 issue
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
What happened:
Teleport tries to purge more than 500 expired documents and reaches a limit of Firestore documented here:
https://firebase.google.com/docs/firestore/quotas#writes_and_transactions
Related code: https://github.com/gravitational/teleport/blob/master/lib/backend/firestore/firestorebk.go#L709-L721
What you expected to happen:
A commit should not contain more than 500 documents. If more than 500 documents are ready to be purged, multiple commits should be made.
Reproduction Steps
As minimally and precisely as possible, describe step-by-step how to reproduce the problem.
Server Details
teleport version
): 7.3.17/etc/os-release
):The text was updated successfully, but these errors were encountered: