Skip to content

Commit

Permalink
fetchAndLoadDatabase wasn't acquiring the lock before falling into _f…
Browse files Browse the repository at this point in the history
…etchAndLoadDatabase
  • Loading branch information
bbrks committed Jan 11, 2024
1 parent 2e37dac commit 65ba90d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,8 @@ func (sc *ServerContext) fetchAndLoadDatabaseSince(ctx context.Context, dbName s
}

func (sc *ServerContext) fetchAndLoadDatabase(nonContextStruct base.NonCancellableContext, dbName string) (found bool, err error) {
sc.lock.Lock()
defer sc.lock.Unlock()
return sc._fetchAndLoadDatabase(nonContextStruct, dbName)
}

Expand Down

0 comments on commit 65ba90d

Please sign in to comment.