question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Batch writes counts

See original GitHub issue

Environment details

  • OS: windows 10
  • .NET version: netcore2.1
  • Package name and version: Google.Cloud.Firestore 1.0.0-beta10

Bug report

when using writebatchs any operation like batch.Create or batch.Set count as 2 write on firestore.

you can check with the debugger looking on the batch.Elements private field or just create a batch with 300 batch.Create or batch.Set and the 500 limit for request will be hit.

I dont know if this is the expected behavior anyway I think it could be really useful to have a public WriteCount property in the batch class

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jskeetcommented, Oct 8, 2020

@giammin: Yes - each operation will now only create a single Write.

1reaction
jskeetcommented, Jul 4, 2019

Right - it sounds like the team’s suggestion is basically making a lot of very small requests in parallel instead. (At least task parallelization in .NET makes this simple…) Thanks for being so understanding - closing now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Transactions and batched writes | Firestore - Firebase - Google
A batched write can contain up to 500 operations. Each operation in the batch counts separately towards your Cloud Firestore usage. Like transactions,...
Read more >
Does a Firestore batch.set() to a same document counts as ...
1 Answer. batch. set() does not directly cost any document writes. It is just queuing up a change locally before being sent to...
Read more >
Spring Batch Count of Processed Records Example
Record count using ChunkListener. Below given ChunkListener implementation count the number of records processed periodically.
Read more >
apex - Count of records processed during batch
I have a batch apex in which I am trying to insert 1000 records at a time. I am using Database.insert() to insert...
Read more >
How to write Batch Apex for counting number of associated ...
I'm writing batch class to count number of Contacts associated with Account, I want to update custom field in Account object Number_of_Contacts ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found