From b1dbd35da1d7abea5e52b7aacdb7bed2812dd9db Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Wed, 18 Jun 2014 16:16:58 -0600 Subject: Fix merge-split regression. This commit reverts merge-split and fixes the node.split() to do a multi-page split. This issue caused problems with bulk loading because it would split into a small page and a very large page. The very large page, in turn, would be an arbitrary size so when it was freed later it would be difficult to reuse and would cause serious fragmentation issues. --- db.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'db.go') diff --git a/db.go b/db.go index e88e499..9a125ee 100644 --- a/db.go +++ b/db.go @@ -5,6 +5,8 @@ import ( "fmt" "hash/fnv" "os" + "runtime/debug" + "strings" "sync" "unsafe" ) @@ -652,3 +654,8 @@ func warn(v ...interface{}) { func warnf(msg string, v ...interface{}) { fmt.Fprintf(os.Stderr, msg+"\n", v...) } + +func printstack() { + stack := strings.Join(strings.Split(string(debug.Stack()), "\n")[2:], "\n") + fmt.Fprintln(os.Stderr, stack) +} -- cgit v1.2.3