Do not acquire schema lock from data read transaction (#6158)
Do not acquire schema lock from data read transaction (#6158)

## What is the goal of this PR?

Currently, we erroneously acquired schema lock for a data read transaction, but only unlock for data write transaction. This causes sometimes schema lock is acquired and never unlocked, hence causing the database to unable to open transactions.

## What are the changes implemented in this PR?

- Acquire schema lock only when data transaction type is WRITE.

graknlabs/grakn,lolski/grakn,lolski/grakn,graknlabs/grakn,lolski/grakn,graknlabs/grakn,graknlabs/grakn,lolski/grakn