Skip to content

Support for BulkWriter #57

Description

@fwal

PR #55 adds transaction and write batch support via Firestore.withTransaction / Firestore.withBatch, but a WriteBatch is capped at 500 operations and is unthrottled — it doesn't cover the bulk-mutation use case that the Admin SDK's BulkWriter handles natively (automatic batching, 500/50/5 ramp-up, retry with backoff on write-quota throttling).

Motivation

Real-world codebases fall back to the raw SDK for large fan-out writes and deletes (mass deletes of user data, seeding/teardown, duplicating document trees). A common workaround is reimplementing bulk writes with Effect.all and a hand-tuned concurrency limit to dodge write-quota throttling — exactly what BulkWriter is built for.

Suggested shape

A Firestore.withBulkWriter combinator in the same style as withTransaction/withBatch from PR #55 (fiber-local routing so existing repositories participate unchanged), or a standalone service exposing the underlying create/set/update/delete/flush/close operations as Effects.

Admin SDK only — the client SDK has no BulkWriter, so the client layer would need to die or fall back, mirroring how PR #55 handles client-side restrictions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions