Why lock shards when createWorkflow

code as blow. is it necessary to lock shard when createWorkflow, what will happen if not lock shard when create workflow. will it cause problem ?

lock when create workflow

Shard lock exists because Cassandra does not support concurrent lightweight transaction on same partition and shard id is the partition key.
Historically, Cassandra was the first and only supported persistence so the lock exists to protect Cassandra.