Fixed lock problem in cassandra datastore that caused deadlock