Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

DB size grows on OS X #303

Closed
xlab opened this issue Feb 16, 2015 · 10 comments · Fixed by #304
Closed

DB size grows on OS X #303

xlab opened this issue Feb 16, 2015 · 10 comments · Fixed by #304

Comments

@xlab
Copy link

xlab commented Feb 16, 2015

Hello. I have OS X Yosemite 10.10.2 and go1.4.1 darwin/amd64, the situation is similar to #291. It seems that #292 fix works, because DB size grows exactly by 1GB at once. The problem is, the file grows on each bolt.Open, the initial size of DB was 3072MB

func main() {
    for i := 0; i < 100; i++ {
        db, _ := bolt.Open("file.db", 0644, nil)
        time.Sleep(time.Second)
        db.Close()
    }
}

After ~100 seconds I've got ~103GB file and no space left on the device.
file resize error: truncate file.db: no space left on device

I can tell more details upon request, just don't know what kind of details will be useful there.
Thanks.

@xlab xlab changed the title DB size grows on OSX DB size grows on OS X Feb 16, 2015
@benbjohnson
Copy link
Member

What commit SHA1 are you using? I ran your example using the latest (75f70a1) and it doesn't grow the database beyond the initial 1MB size.

@benbjohnson
Copy link
Member

Ah, nm. I found it once I bumped the size high enough. Thanks. Will fix.

@xlab
Copy link
Author

xlab commented Feb 16, 2015

I'm using b8dbe11 that's the last significant commit. My DB is 3072MB in size so maybe that matters. I need some time to reproduce that bug using abstract data, so will update this issue later. As the most simple way, I can hand you my 3GB blob privately, but it's better to make a test case :) Stay tuned.

@GregIngelmo
Copy link

@GregIngelmo
Copy link

Oh nm, didn't see your confirm ben

@benbjohnson
Copy link
Member

@xlab @kemist: Fixed: #304

@benbjohnson
Copy link
Member

CI is 💚 but can one of you confirm the fix before I merge it?

@GregIngelmo
Copy link

Hey Ben, you are fast! Confirmed, db no longer grows

@benbjohnson
Copy link
Member

💃

@xlab
Copy link
Author

xlab commented Feb 17, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants