-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
During deployment of a 2nd Gen Firestore functions, the CLI retrieves metadata associated with the Firestore database in order to ensure that the region of the Firestore database matches the region of the deployed function:
firebase-tools/src/deploy/functions/services/firestore.ts
Lines 9 to 15 in 1f4f6f4
export async function ensureFirestoreTriggerRegion( | |
endpoint: backend.Endpoint & backend.EventTriggered | |
): Promise<void> { | |
const db = await firestore.getDatabase( | |
endpoint.project, | |
endpoint.eventTrigger.eventFilters?.database || "(default)" | |
); |
Unfortunately, when a large number of functions are deployed that each target a different Firestore instance (you are allowed to have multiple instances of Firestore on a single GCP project), developer will likely see a quota exceeds error:
Quota exceeded for quota metric 'Database operation requests' and limit 'Database Operations Per Minute' of service 'firestore.googleapis.com' for consumer ...