diff --git a/lm2.go b/lm2.go index a744a84..4db439e 100644 --- a/lm2.go +++ b/lm2.go @@ -825,6 +825,8 @@ func (c *Collection) sync() error { // Close closes a collection and all of its resources. func (c *Collection) Close() { + c.metaLock.Lock() + defer c.metaLock.Unlock() c.f.Close() c.wal.Close() c.cache.close()