Hi, i have a question about Cassandra implementation of Temporal.
When temporal create a new workflow execution, it create a batch of 2 queries targeting 2 tables (history_tree, history_node). Since it’s a multi-table batch, i’m wondering what is the consistency guarantee for this operation. Could there be any case where a new branch is created in history_tree
but no nodes are inserted in history_node
?
This situation is possible, but this doesn’t lead to any application visible issues as the workflow is considered created only after its mutable state is commited to the DB using a LWT transaction.
Hey @maxim, thanks for the reply.
One follow up, we are using scylladb (i know scylladb is not supported). So i notice there is a different between cass and scylla in handling multi-table batch (see Docs: ScyllaDB Multi-Table BATCH behavior · Issue #15688 · scylladb/scylladb · GitHub).
Will this cause a data consistency issue? Eg: first nodes in history_nodes disappear ?
I don’t think so as Temporal doesn’t expect atomicity when updating multiple tables. I don’t think it uses batches that spawn multiple tables.
I see in this file temporal/common/persistence/cassandra/history_store.go at c45e465713c98e337a2a16f706aa1e47806016a0 · temporalio/temporal · GitHub where in case of a new branch, temporal executes a batch that target both history_tree and history_node table. Am i missing something?