Closed axww closed 2 weeks ago
Hi, 0w0c! Batch
can be called concurrently from different goroutines.
In your scenario each batch contains exactly one transaction and every iteration takes at least 20ms (default batch waiting time). To make better use of batches you might want to spawn a goroutine inside your loop.
Hi, 0w0c!
Batch
can be called concurrently from different goroutines. In your scenario each batch contains exactly one transaction and every iteration takes at least 20ms (default batch waiting time). To make better use of batches you might want to spawn a goroutine inside your loop.
Thank you so much! I've tried merge all loop into one Batch and the problem solved.
Recently I'm doing some test on BBolt, aim to fill 100,000 IDs into Bucket. Here's my test code "main.go", using latest BBolt version, very simple:
When I run this on Windows 11, it totally stucked. Then I reduced range 100000 to range 10000, it works. However it takes abount 1 minute, longer than other databases. Also these data occupied 1MB, obviously larger than other databases.
I wonder is there anything wrong with my test method, any way to solve if I want to handle such type of massive puts? Thank you very much!