diff --git a/tx.go b/tx.go
index 076fff2..cb1ce5e 100644
--- a/tx.go
+++ b/tx.go
@@ -173,7 +173,9 @@ func (t *Tx) Commit() error {
 
 	// Rebalance and spill data onto dirty pages.
 	t.rebalance()
-	t.spill()
+	if err := t.spill(); err != nil {
+		return err
+	}
 
 	// Spill buckets page.
 	p, err := t.allocate((t.buckets.size() / t.db.pageSize) + 1)