We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 014567e commit 5e27733Copy full SHA for 5e27733
tx.go
@@ -509,15 +509,19 @@ func (tx *Tx) writeMeta() error {
509
tx.meta.write(p)
510
511
// Write the meta page to file.
512
+ tx.db.metalock.Lock()
513
if _, err := tx.db.ops.writeAt(buf, int64(p.id)*int64(tx.db.pageSize)); err != nil {
514
+ tx.db.metalock.Unlock()
515
return err
516
}
517
if !tx.db.NoSync || IgnoreNoSync {
518
// gofail: var beforeSyncMetaPage struct{}
519
if err := fdatasync(tx.db); err != nil {
520
521
522
523
524
525
526
// Update statistics.
527
tx.stats.IncWrite(1)
0 commit comments