diff --git a/qdb/memqdb.go b/qdb/memqdb.go index 2bb6f2f0c..d7a93bede 100644 --- a/qdb/memqdb.go +++ b/qdb/memqdb.go @@ -202,7 +202,8 @@ func (q *MemQDB) DropKeyRange(_ context.Context, id string) error { lock, ok := q.Locks[id] if !ok { - if err := ExecuteCommands(q.DumpState, NewUpdateCommand(q.Locks, id, &sync.RWMutex{})); err != nil { + lock = &sync.RWMutex{} + if err := ExecuteCommands(q.DumpState, NewUpdateCommand(q.Locks, id, lock)); err != nil { return err } }