diff --git a/pkg/keyspace/keyspace.go b/pkg/keyspace/keyspace.go index 2ec7f104fa9..3d208aef2a2 100644 --- a/pkg/keyspace/keyspace.go +++ b/pkg/keyspace/keyspace.go @@ -785,7 +785,9 @@ func (manager *Manager) PatrolKeyspaceAssignment(startKeyspaceID, endKeyspaceID if err != nil { return err } + manager.kgm.Lock() manager.kgm.groups[endpoint.StringUserKind(defaultKeyspaceGroup.UserKind)].Put(defaultKeyspaceGroup) + manager.kgm.Unlock() // If all keyspaces in the current batch are assigned, update the next start ID. manager.nextPatrolStartID = nextStartID }