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.
PR #55 adds transaction and write batch support via
Firestore.withTransaction/Firestore.withBatch, but aWriteBatchis capped at 500 operations and is unthrottled — it doesn't cover the bulk-mutation use case that the Admin SDK'sBulkWriterhandles 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.alland a hand-tuned concurrency limit to dodge write-quota throttling — exactly whatBulkWriteris built for.Suggested shape
A
Firestore.withBulkWritercombinator in the same style aswithTransaction/withBatchfrom PR #55 (fiber-local routing so existing repositories participate unchanged), or a standalone service exposing the underlyingcreate/set/update/delete/flush/closeoperations 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.