Skip to content

Commit 6ad0d0b

Browse files
add locking back
1 parent 89d9b91 commit 6ad0d0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

datamodel/high/base/schema_proxy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ func (sp *SchemaProxy) BuildTempSchema() (*Schema, error) {
168168
if sp == nil {
169169
return nil, nil
170170
}
171+
sp.lock.Lock()
171172
s := sp.schema.Value.TempSchema()
172173
if s == nil {
174+
defer sp.lock.Unlock()
173175
return nil, sp.schema.Value.GetBuildError()
174176
}
177+
sp.lock.Unlock()
175178
sch := NewSchema(s)
176179
sch.ParentProxy = sp
177180
return sch, nil

0 commit comments

Comments
 (0)