diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2016-01-11 14:47:01 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2016-01-11 14:47:01 -0700 |
commit | 694a82a9595845d376dd19ff5c24cab78801204b (patch) | |
tree | 19c30005f6e3c46c78eb582e9f28f8af81d24d10 /bolt_unix_solaris.go | |
parent | Merge pull request #479 from azazeal/master (diff) | |
parent | do not grow dbsize agressively (diff) | |
download | dedo-694a82a9595845d376dd19ff5c24cab78801204b.tar.gz dedo-694a82a9595845d376dd19ff5c24cab78801204b.tar.xz |
Merge branch 'grow' of https://github.com/xiang90/bolt into xiang90-grow
Diffstat (limited to 'bolt_unix_solaris.go')
-rw-r--r-- | bolt_unix_solaris.go | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/bolt_unix_solaris.go b/bolt_unix_solaris.go index 214009b..1c4e48d 100644 --- a/bolt_unix_solaris.go +++ b/bolt_unix_solaris.go @@ -56,17 +56,6 @@ func funlock(f *os.File) error { // mmap memory maps a DB's data file. func mmap(db *DB, sz int) error { - // Truncate and fsync to ensure file size metadata is flushed. - // https://github.com/boltdb/bolt/issues/284 - if !db.NoGrowSync && !db.readOnly { - if err := db.file.Truncate(int64(sz)); err != nil { - return fmt.Errorf("file resize error: %s", err) - } - if err := db.file.Sync(); err != nil { - return fmt.Errorf("file sync error: %s", err) - } - } - // Map the data file to memory. b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) if err != nil { |