firebase / firebase/firebase-tools
firestore-debug.log can reach >10GB of size
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
### [REQUIRED] Environment info
**firebase-tools:** 11.24.0
**Platform:** Ubuntu
### [REQUIRED] Test case
Sorry I can only provide this:
```typescript
exports.materialImport = functions.region(DEFAULT_REGION)
.runWith({
// Ensure the function has enough memory and time
// to process large files
timeoutSeconds: 300,
memory: "1GB",
})
.https
.onCall(async (data, context) => {
const items = data.items as Material[]
const repository = new MaterialRepository()
const writer = db.bulkWriter()
const oldItems = await repository.getAll()
repository.bulkDelete(writer, oldItems)
repository.bulkSave(writer, items)
return writer.close()
})
```
### [REQUIRED] Steps to reproduce
Basically, I'm doing thousands of writes using Firestore BulkWriter from its NodeJS SDK then testing it using Firebase Emulator
1. Create the bulk writer callable function (code above)
2. Call it with passing an array of ~1800 objects/items
3. The function will delete all old items, then save new items using BulkWriter
### [REQUIRED] Expected behavior
All data is saved, and since I'm using BulkWriter it should be fast, maybe in less than 10 seconds?
### [REQUIRED] Actual behavior
It runs for more than 60 seconds then the emulator forcefully stopped because the disk is full. The firestore-debug.log file is the cause. After deleting the file, the emulator can't be started again unless after PC is restarted. Adding `runWith` doesn't help.
Contributor guide
Assessment
This issue has not been assessed yet.