Benjamin Wang

Results 627 comments of Benjamin Wang

> what NoFreelistSync implies so I'm not sure I can use it in production though.. It's a tradeoff. If the freelist isn't synced to disk, then it may take a...

The only useful use case for `NoFreelistSync` being setting as `false` is for lots of readonly transactions, because it has a better startup performance, and no syncing freelist cost. Should...

> But there is an issue. I simply can't start my program without doing a compact first. What's the issue? Could you be a little more specific on this? I...

> `Check()` should definitely return an error instead of panicking. Agreed. Fixing corrupted db file is my top priority recently. The most important thing is to figure out how to...

> I am also running into the issue that `Check()` on a corrupt DB crashes. `Check()` should definitely return an error instead of panicking. > > [panics-on-check.db.zip](https://github.com/etcd-io/bbolt/files/9969670/panics-on-check.db.zip) The DB (`panics-on-check.db`)...

> [test.db.gz](https://github.com/coreos/bbolt/files/2139441/test.db.gz) The corrupted file provided by @tmm1 seems like a potential bbolt bug. What's your bbolt version? The freelist page (108) was somehow reset (all fields have zero value)....

> [test.db.gz](https://github.com/coreos/bbolt/files/2139441/test.db.gz) There is even no way to fix the corrupted db file. The file is only 204800 bytes, so it's 50 pages ( 204800/4096 ). Obviously the root page...

What's the value of [NoFreelistSync](https://github.com/etcd-io/bbolt/blob/fc361799ce2ec35489a80ad584cf6bcfc6b312c4/db.go#L1207) when opening the db? If freelist isn't synced to disk, it may take a while to load all the freelist on startup. Note only one...

> To optimize writing, consider setting higher 'AllocSize' option to minimize number of file resizes during write. Unfortunately, we don't expose the AllocSize in [Options](https://github.com/etcd-io/bbolt/blob/8f4a7e1f92975fbd1536a569d7aad6800809ef4e/db.go#L1196). It's hard coded to `DefaultAllocSize...

@marcus-wishes 1. What exact bbolt version are you testing against? 2. What exact size is the db file? An e2e test case includes two stages, the first stage is to...