Fix a bug causing ConcurrentModificationException (#6039)
Fix a bug causing ConcurrentModificationException (#6039)

## What is the goal of this PR?

We have fixed a bug which causes `ConcurrentModificationException` while executing queries with multithreading.

## What are the changes implemented in this PR?

- The `HashMap` under `GraphProducer` is not concurrent safe, and we need to protect it against multithreading access.
- Fix https://github.com/graknlabs/grakn/issues/6027
lolski/grakn,graknlabs/grakn,lolski/grakn,graknlabs/grakn,graknlabs/grakn,lolski/grakn,graknlabs/grakn,lolski/grakn