-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Conversation
This commit fixes an issue where the database would grow whenever it was opened. This was caused by a recent change that performed a truncation when the database grew. Now there are fixed growth sizes for the database (1MB, 2MB, 4MB, 8MB, etc) up to 1GB and then the database will grow by 1GB when it resizes. See also: 6bb2585
@tv42 Does this look correct to you? It was caused by the truncation-on-resize change I made recently. |
Oh good catch, now it actually changes the size on the disk and not just the mmap view, and the old logic had a self-feeding spiral.. I added comments to benbjohnson@834b38e, summary: off-by-one, 32-bit worries, me nagging about errors. |
Awesome, thanks for looking through. I made the max step change and max size check change here: dacc187 |
OK, I spent 2 hours trying to get a 32-bit vagrant working but no ****ing luck. Here's my next attempt. I'm converting to int64 to prevent overflow and checking. Does this make sense: 338d8e7 |
@benbjohnson Yeah can't see anything wrong with this one. Sometimes the simplest things are the hardest ones ;) |
Fix mmap resize calculation.
Awesome, thanks! By the way, good luck on the Bolt talk at GoSF. Is it being recorded? |
@benbjohnson All I can say at this time is that I've seen earlier ones recorded, and sometimes they show up on youtube. |
Overview
This pull request fixes an issue where the database would grow whenever it was opened. This was caused by a recent change that performed a truncation when the database grew. Now there are fixed growth sizes for the database (1MB, 2MB, 4MB, 8MB, etc) up to 1GB and then the database will grow by 1GB when it resizes.
See also: 6bb2585
Fixes: #291
/cc @kemist