From aba25bde9e8c7667997ba2c2b7aff0b2cb734df1 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Wed, 9 Oct 2013 19:45:45 -0700 Subject: [PATCH] Typos and FIXMEs Upstream-commit: f7a2f0b93746d33da42b892abc6d5e0a05741321 Component: engine --- components/engine/gograph/gograph.go | 2 ++ components/engine/gograph/gograph_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/engine/gograph/gograph.go b/components/engine/gograph/gograph.go index 28ce74081e..21f2966e2d 100644 --- a/components/engine/gograph/gograph.go +++ b/components/engine/gograph/gograph.go @@ -104,9 +104,11 @@ func (db *Database) Set(fullPath, id string) (*Entity, error) { return nil, err } defer conn.Close() + // FIXME: is rollback implicit when closing the connection? rollback := func() { conn.Exec("ROLLBACK") } + // FIXME: use exclusive transactions to avoid race conditions if _, err := conn.Exec("BEGIN"); err != nil { return nil, err } diff --git a/components/engine/gograph/gograph_test.go b/components/engine/gograph/gograph_test.go index f21d8bb85c..5c12128ca8 100644 --- a/components/engine/gograph/gograph_test.go +++ b/components/engine/gograph/gograph_test.go @@ -22,7 +22,7 @@ func destroyTestDb(db *Database) { func TestNewDatabase(t *testing.T) { db := newTestDb(t) if db == nil { - t.Fatal("Datbase should not be nil") + t.Fatal("Database should not be nil") } defer destroyTestDb(db) }