Skip to content

Commit

Permalink
Remove Start() check from WriteTxn()
Browse files Browse the repository at this point in the history
It is often useful, especially in tests, to be able to populate the tables
before starting the application. While it is useful to check that the
DB has been started (e.g. graveyard GC is running), it's currently too
inconvenient to disallow using of the database before starting it.

Signed-off-by: Jussi Maki <[email protected]>
  • Loading branch information
joamaki committed May 8, 2024
1 parent 9ece035 commit 44a4801
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,6 @@ type Handle struct {
}

func (h Handle) WriteTxn(table TableMeta, tables ...TableMeta) WriteTxn {
if h.db.gcTrigger == nil {
panic("Database has not been started with Start()")
}

db := h.db
allTables := append(tables, table)
smus := internal.SortableMutexes{}
Expand Down

0 comments on commit 44a4801

Please sign in to comment.