diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 21:50:34 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-02-15 21:50:34 -0700 |
commit | 7fb06feea4012543b6a1b0726a09e9a4c4a84933 (patch) | |
tree | 057b2bf9d7487343f477f62726919421dc66b6b6 /transaction.go | |
parent | Merge pull request #32 from benbjohnson/blocks (diff) | |
download | dedo-7fb06feea4012543b6a1b0726a09e9a4c4a84933.tar.gz dedo-7fb06feea4012543b6a1b0726a09e9a4c4a84933.tar.xz |
Add parallel usage test and race detector.
Diffstat (limited to 'transaction.go')
-rw-r--r-- | transaction.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/transaction.go b/transaction.go index 713a019..46adefe 100644 --- a/transaction.go +++ b/transaction.go @@ -20,9 +20,13 @@ type txnid uint64 // init initializes the transaction and associates it with a database. func (t *Transaction) init(db *DB) { t.db = db - t.meta = db.meta() t.pages = nil + // Copy the meta page since it can be changed by the writer. + t.meta = &meta{} + db.meta().copy(t.meta) + + // Read in the buckets page. t.buckets = &buckets{} t.buckets.read(t.page(t.meta.buckets)) } |