Commit Graph

3 Commits (63ec32ef321972daedc5f45f3b799adac9dda110)

Author SHA1 Message Date
Ben Johnson 6bb25854a1 Add truncate() and sync() on resize.
This commit fixes an issue with ext3/ext4 filesystems where metadata file size is not synced
when resizing a file. It also resizes the entire resize instead of updating the size during
individual page writes.

Thanks to @tv42 for the fix.
2015-01-18 08:24:53 -07:00
Dave Collins 8cdba50ea1 Rework build to support more liberal unix variants.
Rather than having the build setup such that it will only work on the
specifically defined operating systems, this commit modifies it to use
more liberal !windows,!plan9 build tag for the unix specific bits.

This means bolt will compile on more Operating Systems such as OpenBSD,
FreeBSD, and NetBSD.

See boltdb/bolt#257 for discussion.
2014-09-18 14:04:59 -05:00
Ben Johnson 00ee0da528 Add Open() options, flock timeout.
This commit changes Open() to provide an additional Options argument. The options
argument currently only has a Timeout which will cause the Open() to return
ErrTimeout if a file lock cannot be obtained in time.

Fixes #207.
2014-06-21 14:44:28 -06:00